X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=libs%2Fstr.h;fp=libs%2Fstr.h;h=47be309dd2318e6e75f150e1d81ee369a5dcb573;hb=11018d4c7a79bf63ed40f942ec89620a1b0c6ad7;hp=9090bf2d6e4587b797c1fbfa7a87d8a0fc63e1b3;hpb=900e47627c52a566489cd09c5984b03d8e8c9358;p=xonotic%2Fnetradiant.git diff --git a/libs/str.h b/libs/str.h index 9090bf2d..47be309d 100644 --- a/libs/str.h +++ b/libs/str.h @@ -254,7 +254,6 @@ const char* Left( std::size_t n ){ } else { - g_pStrWork = ""; g_pStrWork = new char[1]; g_pStrWork[0] = '\0'; } @@ -290,7 +289,6 @@ const char* Mid( std::size_t first, std::size_t n ) const { } else { - g_pStrWork = ""; g_pStrWork = new char[1]; g_pStrWork[0] = '\0'; } @@ -429,7 +427,7 @@ bool operator >( char* pStr ) const { return ( m_bIgnoreCase ) ? stricmp( m_pStr bool operator >( const char* pStr ) const { return ( m_bIgnoreCase ) ? stricmp( m_pStr, pStr ) > 0 : strcmp( m_pStr, pStr ) > 0; } char& operator []( std::size_t nIndex ) { return m_pStr[nIndex]; } const char& operator []( std::size_t nIndex ) const { return m_pStr[nIndex]; } -const char GetAt( std::size_t nIndex ) { return m_pStr[nIndex]; } +char GetAt( std::size_t nIndex ) { return m_pStr[nIndex]; } };