Remove 'util_EatAllSpaces' method, which did shady things with iterators and didn't even eat all whitespace
This commit is contained in:
parent
ea2170fd20
commit
4cb15a741a
|
@ -63,7 +63,6 @@ static int util_ConvertOctal( const char* psz, int* const pnCharsRead );
|
||||||
static bool util_IsOctal( const char ch );
|
static bool util_IsOctal( const char ch );
|
||||||
static int util_GetEscapeValueOfChar( char ch );
|
static int util_GetEscapeValueOfChar( char ch );
|
||||||
static int util_GetRecurseDepth( const cParseNamedAttrList* pList ); //throw( eParserHelper )
|
static int util_GetRecurseDepth( const cParseNamedAttrList* pList ); //throw( eParserHelper )
|
||||||
static void util_EatAllSpaces( TSTRING& str );
|
|
||||||
static void util_LoseSurroundingWS( TSTRING& str );
|
static void util_LoseSurroundingWS( TSTRING& str );
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
static bool util_AsciiCharsActLikeTheyShould();
|
static bool util_AsciiCharsActLikeTheyShould();
|
||||||
|
@ -671,7 +670,7 @@ void cParserUtil::CreatePropVector( const TSTRING& strPropListC, class cFCOPropV
|
||||||
|
|
||||||
// clear out all spaces in the string
|
// clear out all spaces in the string
|
||||||
TSTRING strPropList = strPropListC;
|
TSTRING strPropList = strPropListC;
|
||||||
util_EatAllSpaces( strPropList );
|
strPropList.erase(std::remove_if(strPropList.begin(), strPropList.end(), std::ptr_fun<int, int>(std::isspace)), strPropList.end());
|
||||||
|
|
||||||
// zero it out
|
// zero it out
|
||||||
v.Clear();
|
v.Clear();
|
||||||
|
@ -741,17 +740,6 @@ void cParserUtil::CreatePropVector( const TSTRING& strPropListC, class cFCOPropV
|
||||||
v.RemoveItem( propIndex );
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1079,18 +1067,6 @@ TSTRING::size_type util_FindNextDelim( const TSTRING& str, TSTRING::size_type i
|
||||||
return min;
|
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 )
|
void util_LoseSurroundingWS( TSTRING& str )
|
||||||
{
|
{
|
||||||
TSTRING::size_type nonWSStart = str.find_first_not_of( _T(" \t"), 0 );
|
TSTRING::size_type nonWSStart = str.find_first_not_of( _T(" \t"), 0 );
|
||||||
|
|
Loading…
Reference in New Issue