diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index 98acf3eadf..91f3adce5d 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -126,6 +126,11 @@ static char* tcsepbrk( const char* psz, const char* chset, int escape ) return pch; } +static bool XIsEmptyString( const CString &s ) +{ + return s.find_first_not_of( "\r\n\t " ) == s.npos; +} + // Desc : put string of (psz~end) on ps string static void SetString( char* psz, char* end, CString* ps, bool trim = false, int escape = 0 ) { @@ -987,12 +992,3 @@ bool XNode::SaveToFile( const CString &sFile, DISP_OPT *opt ) const return SaveToFile( f, opt ); } - -bool XIsEmptyString( const char* str ) -{ - CString s(str); - TrimLeft( s ); - TrimRight( s ); - - return ( s.empty() || s == "" ); -} diff --git a/stepmania/src/XmlFile.h b/stepmania/src/XmlFile.h index b660f144d2..00e85f6ebb 100644 --- a/stepmania/src/XmlFile.h +++ b/stepmania/src/XmlFile.h @@ -235,6 +235,4 @@ inline long XStr2Int( const char* str, long default_value = 0 ) return str ? atol(str) : default_value; } -bool XIsEmptyString( const char* str ); - #endif