[MOAB-dev] r5127 - in MOAB/trunk/src: . moab
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Fri Aug 26 14:27:15 CDT 2011
Author: tautges
Date: 2011-08-26 14:27:15 -0500 (Fri, 26 Aug 2011)
New Revision: 5127
Modified:
MOAB/trunk/src/Skinner.cpp
MOAB/trunk/src/moab/ScdInterface.hpp
MOAB/trunk/src/moab/Skinner.hpp
Log:
A few changes to remove warnings and inline a few things.
Modified: MOAB/trunk/src/Skinner.cpp
===================================================================
--- MOAB/trunk/src/Skinner.cpp 2011-08-26 19:12:06 UTC (rev 5126)
+++ MOAB/trunk/src/Skinner.cpp 2011-08-26 19:27:15 UTC (rev 5127)
@@ -47,7 +47,7 @@
}
-void Skinner::initialize()
+ErrorCode Skinner::initialize()
{
// go through and mark all the target dimension entities
// that already exist as not deleteable
@@ -57,14 +57,14 @@
DimensionPair target_ent_types = CN::TypeDimensionMap[mTargetDim];
void* null_ptr = NULL;
- ErrorCode result;
- result = thisMB->tag_get_handle("skinner adj", sizeof(void*), MB_TYPE_OPAQUE, mAdjTag, MB_TAG_DENSE|MB_TAG_CREAT, &null_ptr);
- assert(MB_SUCCESS == result);
+ ErrorCode result = thisMB->tag_get_handle("skinner adj", sizeof(void*), MB_TYPE_OPAQUE, mAdjTag,
+ MB_TAG_DENSE|MB_TAG_CREAT, &null_ptr);
+ if (MB_SUCCESS != result) return result;
if(mDeletableMBTag == 0) {
result = thisMB->tag_get_handle("skinner deletable", 1, MB_TYPE_BIT, mDeletableMBTag, MB_TAG_BIT|MB_TAG_CREAT);
- assert(MB_SUCCESS == result);
+ if (MB_SUCCESS != result) return result;
}
Range entities;
@@ -89,16 +89,17 @@
add_adjacency(*iter);
}
}
+
+ return MB_SUCCESS;
}
-void Skinner::deinitialize()
+ErrorCode Skinner::deinitialize()
{
- ErrorCode result = MB_SUCCESS;
-
+ ErrorCode result;
if (0 != mDeletableMBTag) {
result = thisMB->tag_delete( mDeletableMBTag);
mDeletableMBTag = 0;
- assert(MB_SUCCESS == result);
+ if (MB_SUCCESS != result) return result;
More information about the moab-dev
mailing list