[MOAB-dev] r1401 - MOAB/trunk

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Fri Nov 16 10:36:23 CST 2007


Author: kraftche
Date: 2007-11-16 10:36:23 -0600 (Fri, 16 Nov 2007)
New Revision: 1401

Modified:
   MOAB/trunk/AEntityFactory.cpp
Log:
fix bugs in get_memory_use

Modified: MOAB/trunk/AEntityFactory.cpp
===================================================================
--- MOAB/trunk/AEntityFactory.cpp	2007-11-16 15:29:36 UTC (rev 1400)
+++ MOAB/trunk/AEntityFactory.cpp	2007-11-16 16:36:23 UTC (rev 1401)
@@ -1337,7 +1337,7 @@
   if (MB_SUCCESS != rval)
     return rval;
   
-  while (!iter.is_at_end()) {
+  do {
     MBAdjacencyVector** array = iter.get_sequence()->data()->get_adjacency_data();
     if (!array)
       continue;
@@ -1356,9 +1356,9 @@
       if (array[i]) 
         min_per_ent += sizeof(MBEntityHandle) * array[i]->capacity() + sizeof(MBAdjacencyVector);
     }
-  }
+  } while (MB_SUCCESS == (rval = iter.step()));
   
   amortized += min_per_ent;
-  return MB_SUCCESS;
+  return (rval == MB_FAILURE) ? MB_SUCCESS : rval;
 }   
   




More information about the moab-dev mailing list