[MOAB-dev] r3817 - MOAB/trunk/src

smithrm at mcs.anl.gov smithrm at mcs.anl.gov
Mon Apr 26 11:31:58 CDT 2010


Author: smithrm
Date: 2010-04-26 11:31:58 -0500 (Mon, 26 Apr 2010)
New Revision: 3817

Modified:
   MOAB/trunk/src/Core.cpp
Log:
o Added check to merge_entities verifying the 2 entities to merge are not the same entity.


Modified: MOAB/trunk/src/Core.cpp
===================================================================
--- MOAB/trunk/src/Core.cpp	2010-04-26 01:49:54 UTC (rev 3816)
+++ MOAB/trunk/src/Core.cpp	2010-04-26 16:31:58 UTC (rev 3817)
@@ -2113,6 +2113,10 @@
 {
   if (auto_merge) return MB_FAILURE;
   
+    // The two entities to merge must not be the same entity.
+  if (entity_to_keep == entity_to_remove)
+    return MB_FAILURE;
+
     // The two entities to merge must be of the same type
   EntityType type_to_keep = TYPE_FROM_HANDLE(entity_to_keep);
 






































More information about the moab-dev mailing list