X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=libs%2Fstr.h;h=e7ef600efada9c9d23cbeca5ae5d94154f1d979b;hb=d930835fa0ffd32d2e6459e11e526ec0733745bc;hp=fcc328b1fd6eeacba0a96f8a5adb9f6ba56870ca;hpb=a726c43661057f338f342f13c93ee0fe76698cf7;p=xonotic%2Fnetradiant.git diff --git a/libs/str.h b/libs/str.h index fcc328b1..e7ef600e 100644 --- a/libs/str.h +++ b/libs/str.h @@ -31,6 +31,8 @@ #ifndef __STR__ #define __STR__ +#include "globaldefs.h" + // // class Str // loose replacement for CString from MFC @@ -44,7 +46,7 @@ #include -#ifdef _MSC_VER +#if GDEF_COMPILER_MSVC #define strcasecmp strcmpi #if _MSC_VER < 1400 #define vsnprintf std::vsnprintf @@ -67,7 +69,7 @@ inline char* Q_StrDup( const char* pStr ){ return strcpy( new char[strlen( pStr ) + 1], pStr ); } -#if !defined( WIN32 ) +#if !GDEF_OS_WINDOWS #define strcmpi strcasecmp #define stricmp strcasecmp #define strnicmp strncasecmp @@ -427,7 +429,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]; } };