[MOAB-dev] r4789 - MOAB/trunk/tools/vtkMOABReader

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Mon May 2 11:48:17 CDT 2011


Author: kraftche
Date: 2011-05-02 11:48:16 -0500 (Mon, 02 May 2011)
New Revision: 4789

Modified:
   MOAB/trunk/tools/vtkMOABReader/vtkMOABReader.cxx
Log:
update vtkMOABReader for changes to tag_iterate API, and fix a few warnings

Modified: MOAB/trunk/tools/vtkMOABReader/vtkMOABReader.cxx
===================================================================
--- MOAB/trunk/tools/vtkMOABReader/vtkMOABReader.cxx	2011-05-02 16:37:07 UTC (rev 4788)
+++ MOAB/trunk/tools/vtkMOABReader/vtkMOABReader.cxx	2011-05-02 16:48:16 UTC (rev 4789)
@@ -140,7 +140,7 @@
   Tag gidTag, gdimTag, partTag, catTag;
 };
 
-vtkStandardNewMacro(vtkMOABReaderPrivate);
+vtkStandardNewMacro(vtkMOABReaderPrivate)
 
 inline vtkUnstructuredGrid *vtkMOABReaderPrivate::GetOutput() 
 {
@@ -465,16 +465,17 @@
 
     if (MB_SUCCESS != rval) continue;
 
-    Range::iterator rit, rit2;
-    rit = rit2 = ents2d.begin();
+    Range::iterator rit;
+    rit = ents2d.begin();
     while (rit != ents2d.end()) {
         // get tag iterator for gids
-      rval = mbImpl->tag_iterate(vtkCellTag, rit, ents2d.end(), (void*&)vids);
+      int count;
+      rval = mbImpl->tag_iterate(vtkCellTag, rit, ents2d.end(), count, (void*&)vids);
       if (MB_SUCCESS != rval) continue;
-      int count = rit - rit2;
       
-      rval = mbImpl->tag_iterate(*vit, rit2, ents2d.end(), data);
+      rval = mbImpl->tag_iterate(*vit, rit, ents2d.end(), count, data);
       if (MB_SUCCESS != rval) continue;
+      rit += count;
       
       if (MB_TYPE_DOUBLE == dtype) {
         ddata = (double*)data;
@@ -498,15 +499,16 @@
       MOABMeshErrorMacro(<< "2d: min = " << min << ", max =  " << max);
     }
     
-    rit = rit2 = ents3d.begin();
+    rit = ents3d.begin();
     while (rit != ents3d.end()) {
         // get tag iterator for vids
-      rval = mbImpl->tag_iterate(vtkCellTag, rit, ents3d.end(), (void*&)vids);
+      int count;
+      rval = mbImpl->tag_iterate(vtkCellTag, rit, ents3d.end(), count, (void*&)vids);
       if (MB_SUCCESS != rval) continue;
-      int count = rit - rit2;
       
-      rval = mbImpl->tag_iterate(*vit, rit2, ents3d.end(), data);


More information about the moab-dev mailing list