[MOAB-dev] r3603 - MOAB/trunk/src/io

iulian at mcs.anl.gov iulian at mcs.anl.gov
Fri Mar 12 13:25:45 CST 2010


Author: iulian
Date: 2010-03-12 13:25:45 -0600 (Fri, 12 Mar 2010)
New Revision: 3603

Modified:
   MOAB/trunk/src/io/ReadSmf.cpp
   MOAB/trunk/src/io/ReadSmf.hpp
Log:
eliminate some compile warnings



Modified: MOAB/trunk/src/io/ReadSmf.cpp
===================================================================
--- MOAB/trunk/src/io/ReadSmf.cpp	2010-03-12 19:19:36 UTC (rev 3602)
+++ MOAB/trunk/src/io/ReadSmf.cpp	2010-03-12 19:25:45 UTC (rev 3603)
@@ -21,7 +21,6 @@
 
 #include <assert.h>
 #include <stdlib.h>
-#include <string.h>
 #include <iostream>
 
 #include "ReadSmf.hpp"
@@ -54,7 +53,7 @@
     { "scale", &ReadSmf::scale },
     { "rot", &ReadSmf::rot },
 
-    { NULL, NULL }
+    { "", NULL }
 };
 
 MBAffineXform mat_from_args(std::vector<std::string> & argv)
@@ -292,8 +291,8 @@
 	cmd_entry *entry = &read_cmds[0];
 	bool handled = 0;
 
-	while( entry->name && !handled )
-	    if( streq(entry->name, cmd) )
+	while( entry->name.length() && !handled )
+	    if( streq(entry->name.c_str() , cmd) )
 	    {
 		(this->*(entry->cmd))(argv);
 		handled = 1;
@@ -339,7 +338,7 @@
 {
     int vert[3];
 
-    for(int i=0; i<argv.size(); i++)
+    for(unsigned int i=0; i<argv.size(); i++)
 	vert[i] = atoi(argv[i].c_str());
 
     state->face(vert, ivar);

Modified: MOAB/trunk/src/io/ReadSmf.hpp
===================================================================
--- MOAB/trunk/src/io/ReadSmf.hpp	2010-03-12 19:19:36 UTC (rev 3602)
+++ MOAB/trunk/src/io/ReadSmf.hpp	2010-03-12 19:25:45 UTC (rev 3603)
@@ -58,7 +58,7 @@
 
 
   typedef void (ReadSmf::*read_cmd)( std::vector<std::string> & argv);
-  struct cmd_entry { char *name; read_cmd cmd; };
+  struct cmd_entry { std::string name; read_cmd cmd; };
   void init();
 
 protected:



More information about the moab-dev mailing list