diff --git a/src/twparser/parserhelper.cpp b/src/twparser/parserhelper.cpp index 5f1fc57..62a600b 100644 --- a/src/twparser/parserhelper.cpp +++ b/src/twparser/parserhelper.cpp @@ -63,7 +63,6 @@ static int util_ConvertOctal( const char* psz, int* const pnCharsRead ); static bool util_IsOctal( const char ch ); static int util_GetEscapeValueOfChar( char ch ); static int util_GetRecurseDepth( const cParseNamedAttrList* pList ); //throw( eParserHelper ) -static void util_EatAllSpaces( TSTRING& str ); static void util_LoseSurroundingWS( TSTRING& str ); #ifdef _DEBUG static bool util_AsciiCharsActLikeTheyShould(); @@ -671,7 +670,7 @@ void cParserUtil::CreatePropVector( const TSTRING& strPropListC, class cFCOPropV // clear out all spaces in the string TSTRING strPropList = strPropListC; - util_EatAllSpaces( strPropList ); + strPropList.erase(std::remove_if(strPropList.begin(), strPropList.end(), std::ptr_fun(std::isspace)), strPropList.end()); // zero it out v.Clear(); @@ -741,17 +740,6 @@ void cParserUtil::CreatePropVector( const TSTRING& strPropListC, class cFCOPropV v.RemoveItem( propIndex ); } - /* for 1.5, allow no properties (just track file existence) - // if v is empty, error - cFCOPropVector emptyPropVector; - emptyPropVector.Clear(); - if( v == emptyPropVector ) - { - d.TraceError("CreatePropVector failed!!\n"); - throw eError( ERR_BAD_PROP_STRING, strPropV.c_str() ); - } - */ - return; } @@ -1079,18 +1067,6 @@ TSTRING::size_type util_FindNextDelim( const TSTRING& str, TSTRING::size_type i return min; } -// deletes each space in the string -void util_EatAllSpaces( TSTRING& str ) -{ - for( TSTRING::iterator i = str.begin(); i != str.end(); i++ ) - { - if( *i == _T(' ') ) - { - str.erase( i ); - } - } -} - void util_LoseSurroundingWS( TSTRING& str ) { TSTRING::size_type nonWSStart = str.find_first_not_of( _T(" \t"), 0 );