[MOAB-dev] r4759 - MOAB/trunk/itaps/imesh
jvporter at wisc.edu
jvporter at wisc.edu
Wed Apr 20 16:29:37 CDT 2011
Author: jvporter
Date: 2011-04-20 16:29:37 -0500 (Wed, 20 Apr 2011)
New Revision: 4759
Modified:
MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
Log:
Don't return an error when removing a tag value from an entity/set that
doesn't have that tag set
Modified: MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp 2011-04-20 20:19:49 UTC (rev 4758)
+++ MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp 2011-04-20 21:29:37 UTC (rev 4759)
@@ -1983,8 +1983,11 @@
EntityHandle set = ENTITY_HANDLE(entity_set_handle);
ErrorCode result = MOABI->tag_delete_data(TAG_HANDLE(tag_handle), &set, 1);
- // don't check return; this tag may have never been set on the entity set
- RETURN(iBase_ERROR_MAP[result]);
+ // don't return an error if the tag simply wasn't set on the ent set
+ if (MB_TAG_NOT_FOUND == result)
+ RETURN(iBase_SUCCESS);
+ else
+ RETURN(iBase_ERROR_MAP[result]);
}
void iMesh_setVtxCoord (iMesh_Instance instance,
@@ -2310,8 +2313,11 @@
CONST_HANDLE_ARRAY_PTR(entity_handles),
entity_handles_size);
- // don't check return; this tag may have never been set on the entity
- RETURN(iBase_ERROR_MAP[result]);
+ // don't return an error if the tag simply wasn't set on the entities
+ if (MB_TAG_NOT_FOUND == result)
+ RETURN(iBase_SUCCESS);
+ else
+ RETURN(iBase_ERROR_MAP[result]);
}
void iMesh_getData (iMesh_Instance instance,
More information about the moab-dev
mailing list