[MOAB-dev] r2628 - MOAB/trunk
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Wed Feb 4 13:17:18 CST 2009
Author: kraftche
Date: 2009-02-04 13:17:18 -0600 (Wed, 04 Feb 2009)
New Revision: 2628
Modified:
MOAB/trunk/ReadNCDF.cpp
MOAB/trunk/ReadNCDF.hpp
Log:
Fix bugs indicated by compiler warnings:
- passing string literal as char*
- comparison of char*'s with ==
- no return value from function
Modified: MOAB/trunk/ReadNCDF.cpp
===================================================================
--- MOAB/trunk/ReadNCDF.cpp 2009-02-03 21:48:54 UTC (rev 2627)
+++ MOAB/trunk/ReadNCDF.cpp 2009-02-04 19:17:18 UTC (rev 2628)
@@ -1971,7 +1971,7 @@
}
//2. check for the operations, currently support sum.
- const char *op = "" ;
+ std::stirng op;
if(tokens.size() > 2 && !tokens[2].empty())
op = tokens[2].c_str();
@@ -2093,11 +2093,13 @@
delete [] array2;
delete [] array3;
} //if token[0] == "coord"
+
+ return MB_SUCCESS;
}
void ReadNCDF::tokenize( const std::string& str,
std::vector<std::string>& tokens,
- char* delimiters )
+ const char* delimiters )
{
std::string::size_type last = str.find_first_not_of( delimiters, 0 );
std::string::size_type pos = str.find_first_of( delimiters, last );
Modified: MOAB/trunk/ReadNCDF.hpp
===================================================================
--- MOAB/trunk/ReadNCDF.hpp 2009-02-03 21:48:54 UTC (rev 2627)
+++ MOAB/trunk/ReadNCDF.hpp 2009-02-04 19:17:18 UTC (rev 2628)
@@ -65,8 +65,8 @@
static MBReaderIface* factory( MBInterface* );
static void tokenize( const std::string& str,
- std::vector<std::string>& tokens,
- char* delimiters );
+ std::vector<std::string>& tokens,
+ const char* delimiters );
//! load an ExoII file
MBErrorCode load_file(const char *exodus_file_name,
More information about the moab-dev
mailing list