[GME-commit] GMESRC/GME/Mga MgaLibOps.cpp,1.13,1.14
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Tue Jan 16 19:54:40 CST 2007
Update of /project/gme-repository/GMESRC/GME/Mga
In directory escher:/tmp/cvs-serv6165
Modified Files:
MgaLibOps.cpp
Log Message:
Fix for string parsing.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: MgaLibOps.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaLibOps.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** MgaLibOps.cpp 16 Jan 2007 18:13:33 -0000 1.13
--- MgaLibOps.cpp 16 Jan 2007 19:54:37 -0000 1.14
***************
*** 1021,1034 ****
// skip parsing if empty
std::string::size_type pos = includes_vals.empty()? std::string::npos : 0;
while( pos != std::string::npos)
{
! std::string::size_type last_pos = pos;
! pos = includes_vals.find("\n");
std::string token;
if( pos == std::string::npos)
! token = includes_vals.substr( last_pos);
else
! token = includes_vals.substr( last_pos, pos - last_pos);
CComBSTR lib_id_to_remove;
--- 1021,1036 ----
// skip parsing if empty
std::string::size_type pos = includes_vals.empty()? std::string::npos : 0;
+ std::string::size_type last_pos = pos-1;
while( pos != std::string::npos)
{
! pos = includes_vals.find('\n', last_pos+1);
std::string token;
if( pos == std::string::npos)
! token = includes_vals.substr( last_pos+1);
else
! token = includes_vals.substr( last_pos+1, pos - last_pos-1);
!
! last_pos = pos;
CComBSTR lib_id_to_remove;
More information about the GME-commit
mailing list