From 4abc8861177d575a889d05ca1898ec767d16519b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 22 Jul 2004 19:31:54 +0000 Subject: [PATCH] simplify --- stepmania/src/XmlFile.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index 6f232f6962..eea66c98e8 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -161,7 +161,6 @@ char* _tcsepbrk( const char* psz, const char* chset, int escape ) //======================================================== void _SetString( char* psz, char* end, CString* ps, bool trim = false, int escape = 0 ) { - //trim if( trim ) { while( psz && psz < end && isspace(*psz) ) psz++; @@ -172,7 +171,6 @@ void _SetString( char* psz, char* end, CString* ps, bool trim = false, int escap if( escape ) { len = _tcselen( escape, psz, end ); -// char* pss = ps->GetBufferSetLength( len ); char* szTemp = new char[len]; unescape( szTemp, escape, psz, end ); *ps = szTemp; @@ -180,12 +178,7 @@ void _SetString( char* psz, char* end, CString* ps, bool trim = false, int escap } else { -// char* pss = ps->GetBufferSetLength(len + 1 ); - char* szTemp = new char[len+1]; - memcpy( szTemp, psz, len ); - szTemp[len] = '\0'; - *ps = szTemp; - delete [] szTemp; + ps->assign( psz, len ); } }