]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/str.h
crnlib: update submodule reference
[xonotic/netradiant.git] / libs / str.h
index fcc328b1fd6eeacba0a96f8a5adb9f6ba56870ca..e7ef600efada9c9d23cbeca5ae5d94154f1d979b 100644 (file)
@@ -31,6 +31,8 @@
 #ifndef __STR__
 #define __STR__
 
+#include "globaldefs.h"
+
 //
 // class Str
 // loose replacement for CString from MFC
@@ -44,7 +46,7 @@
 
 #include <cstdio>
 
-#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]; }
 };