[MOAB-dev] r2230 - MOAB/trunk
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Wed Nov 12 21:39:44 CST 2008
Author: kraftche
Date: 2008-11-12 21:39:44 -0600 (Wed, 12 Nov 2008)
New Revision: 2230
Modified:
MOAB/trunk/WriteHDF5.cpp
Log:
minor efficiency improvement: don't search RangeMap for zero-values
Modified: MOAB/trunk/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/WriteHDF5.cpp 2008-11-13 03:38:55 UTC (rev 2229)
+++ MOAB/trunk/WriteHDF5.cpp 2008-11-13 03:39:44 UTC (rev 2230)
@@ -198,9 +198,13 @@
{
bool some_valid = false;
for (size_t i = 0; i < count; ++i) {
- dest[i] = idMap.find( source[i] );
- if (dest[i])
- some_valid = true;
+ if (!source[i])
+ dest[i] = 0;
+ else {
+ dest[i] = idMap.find( source[i] );
+ if (dest[i])
+ some_valid = true;
+ }
}
return some_valid;
}
More information about the moab-dev
mailing list