|
From: Michael D. <mik...@us...> - 2004-04-26 03:48:10
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2435/NHibernate/Collection Modified Files: Bag.cs Log Message: Fixed bugs with NeedsInserting, NeedsDeleting, and GetEnumerator. Index: Bag.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Bag.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Bag.cs 14 Apr 2004 18:10:55 -0000 1.3 --- Bag.cs 26 Apr 2004 03:48:02 -0000 1.4 *************** *** 180,184 **** { bool found = false; ! if(bag.Count>1 && elemType.Equals(oldObject, bag[i++])) { //a shortcut if its location didn't change! --- 180,184 ---- { bool found = false; ! if(bag.Count>i && elemType.Equals(oldObject, bag[i++])) { //a shortcut if its location didn't change! *************** *** 206,210 **** { IList sn = (IList)GetSnapshot(); ! if( sn.Count>1 && elemType.Equals(sn[i], entry) ) { // a shortcut if its location didn't change --- 206,210 ---- { IList sn = (IList)GetSnapshot(); ! if( sn.Count>i && elemType.Equals(sn[i], entry) ) { // a shortcut if its location didn't change *************** *** 338,341 **** --- 338,342 ---- public override IEnumerator GetEnumerator() { + Read(); //TODO: H2.0.3 has an IteratorProxy - do we need?? return bag.GetEnumerator(); |