From 16d0bc10a4fd22c52f1f80b591a2684990def63f Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Tue, 22 Dec 2015 19:50:42 +0000 Subject: Removed offending tr1 references. --- Tools/ProtoProxy/Globals.h | 49 +++++++++++++-------------------------- Tools/QtBiomeVisualiser/Globals.h | 20 ++-------------- Tools/RCONClient/Globals.h | 32 ++++++++++--------------- Tools/ToLuaDoxy/Globals.h | 16 ++++--------- 4 files changed, 34 insertions(+), 83 deletions(-) diff --git a/Tools/ProtoProxy/Globals.h b/Tools/ProtoProxy/Globals.h index efc0a9988..c69931bd5 100644 --- a/Tools/ProtoProxy/Globals.h +++ b/Tools/ProtoProxy/Globals.h @@ -12,26 +12,26 @@ #if defined(_MSC_VER) // MSVC produces warning C4481 on the override keyword usage, so disable the warning altogether #pragma warning(disable:4481) - + // Disable some warnings that we don't care about: #pragma warning(disable:4100) #define OBSOLETE __declspec(deprecated) - + // No alignment needed in MSVC #define ALIGN_8 #define ALIGN_16 - + #define FORMATSTRING(formatIndex, va_argsIndex) #elif defined(__GNUC__) // TODO: Can GCC explicitly mark classes as abstract (no instances can be created)? #define abstract - + // TODO: Can GCC mark virtual methods as overriding (forcing them to have a virtual function of the same signature in the base class) #define override - + #define OBSOLETE __attribute__((deprecated)) #define ALIGN_8 __attribute__((aligned(8))) @@ -39,19 +39,19 @@ // Some portability macros :) #define stricmp strcasecmp - + #define FORMATSTRING(formatIndex, va_argsIndex) #else #error "You are using an unsupported compiler, you might need to #define some stuff here for your compiler" - + /* // Copy and uncomment this into another #elif section based on your compiler identification - + // Explicitly mark classes as abstract (no instances can be created) #define abstract - + // Mark virtual methods as overriding (forcing them to have a virtual function of the same signature in the base class) #define override @@ -107,16 +107,16 @@ typedef unsigned char Byte; #include #include #include - + // Windows SDK defines min and max macros, messing up with our std::min and std::max usage #undef min #undef max - + // Windows SDK defines GetFreeSpace as a constant, probably a Win16 API remnant #ifdef GetFreeSpace #undef GetFreeSpace #endif // GetFreeSpace - + #define SocketError WSAGetLastError() #else #include @@ -138,7 +138,7 @@ typedef unsigned char Byte; #include #include #include - + typedef int SOCKET; enum { @@ -146,9 +146,6 @@ typedef unsigned char Byte; }; #define closesocket close #define SocketError errno -#if !defined(ANDROID_NDK) - #include -#endif #endif #if !defined(ANDROID_NDK) @@ -218,19 +215,9 @@ typedef unsigned char Byte; // Pretty much the same as ASSERT() but stays in Release builds #define VERIFY( x ) ( !!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), exit(1), 0 ) ) -// Allow both Older versions of MSVC and newer versions of everything use a shared_ptr: -// Note that we cannot typedef, because C++ doesn't allow (partial) templates to be typedeffed. -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - // MSVC before 2010 doesn't have std::shared_ptr, but has std::tr1::shared_ptr, defined in included earlier - #define SharedPtr std::tr1::shared_ptr -#elif (defined(_MSC_VER) || (__cplusplus >= 201103L)) - // C++11 has std::shared_ptr in , included earlier - #define SharedPtr std::shared_ptr -#else - // C++03 has std::tr1::shared_ptr in - #include - #define SharedPtr std::tr1::shared_ptr -#endif +// C++11 has std::shared_ptr in , included earlier +#define SharedPtr std::shared_ptr + @@ -243,7 +230,3 @@ public: /// Called for each item in the internal list; return true to stop the loop, or false to continue enumerating virtual bool Item(Type * a_Type) = 0; } ; - - - - diff --git a/Tools/QtBiomeVisualiser/Globals.h b/Tools/QtBiomeVisualiser/Globals.h index cc90f9383..d73881868 100644 --- a/Tools/QtBiomeVisualiser/Globals.h +++ b/Tools/QtBiomeVisualiser/Globals.h @@ -330,19 +330,8 @@ void inline LOGERROR(const char* a_Format, ...) #define assert_test(x) ( !!(x) || (assert(!#x), exit(1), 0)) #endif -// Allow both Older versions of MSVC and newer versions of everything use a shared_ptr: -// Note that we cannot typedef, because C++ doesn't allow (partial) templates to be typedeffed. -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - // MSVC before 2010 doesn't have std::shared_ptr, but has std::tr1::shared_ptr, defined in included earlier - #define SharedPtr std::tr1::shared_ptr -#elif (defined(_MSC_VER) || (__cplusplus >= 201103L)) - // C++11 has std::shared_ptr in , included earlier - #define SharedPtr std::shared_ptr -#else - // C++03 has std::tr1::shared_ptr in - #include - #define SharedPtr std::tr1::shared_ptr -#endif +// C++11 has std::shared_ptr in , included earlier +#define SharedPtr std::shared_ptr @@ -385,8 +374,3 @@ T Clamp(T a_Value, T a_Min, T a_Max) #include "src/BiomeDef.h" #include "src/BlockID.h" #include "src/BlockInfo.h" - - - - - diff --git a/Tools/RCONClient/Globals.h b/Tools/RCONClient/Globals.h index dc7669270..b9b1519e3 100644 --- a/Tools/RCONClient/Globals.h +++ b/Tools/RCONClient/Globals.h @@ -12,23 +12,23 @@ #if defined(_MSC_VER) // MSVC produces warning C4481 on the override keyword usage, so disable the warning altogether #pragma warning(disable:4481) - + // Disable some warnings that we don't care about: #pragma warning(disable:4100) #define OBSOLETE __declspec(deprecated) - + // No alignment needed in MSVC #define ALIGN_8 #define ALIGN_16 - + #define FORMATSTRING(formatIndex, va_argsIndex) // MSVC has its own custom version of zu format #define SIZE_T_FMT "%Iu" #define SIZE_T_FMT_PRECISION(x) "%" #x "Iu" #define SIZE_T_FMT_HEX "%Ix" - + #define NORETURN __declspec(noreturn) // Use non-standard defines in @@ -38,10 +38,10 @@ // TODO: Can GCC explicitly mark classes as abstract (no instances can be created)? #define abstract - + // TODO: Can GCC mark virtual methods as overriding (forcing them to have a virtual function of the same signature in the base class) #define override - + #define OBSOLETE __attribute__((deprecated)) #define ALIGN_8 __attribute__((aligned(8))) @@ -70,19 +70,19 @@ #define SIZE_T_FMT_PRECISION(x) "%" #x "zu" #define SIZE_T_FMT_HEX "%zx" #endif - + #define NORETURN __attribute((__noreturn__)) #else #error "You are using an unsupported compiler, you might need to #define some stuff here for your compiler" - + /* // Copy and uncomment this into another #elif section based on your compiler identification - + // Explicitly mark classes as abstract (no instances can be created) #define abstract - + // Mark virtual methods as overriding (forcing them to have a virtual function of the same signature in the base class) #define override @@ -136,11 +136,11 @@ typedef unsigned char Byte; #include #include #include // IPv6 stuff - + // Windows SDK defines min and max macros, messing up with our std::min and std::max usage #undef min #undef max - + // Windows SDK defines GetFreeSpace as a constant, probably a Win16 API remnant #ifdef GetFreeSpace #undef GetFreeSpace @@ -164,9 +164,6 @@ typedef unsigned char Byte; #include #include #include -#if !defined(ANDROID_NDK) - #include -#endif #endif #if !defined(ANDROID_NDK) @@ -239,8 +236,3 @@ typedef unsigned char Byte; // Pretty much the same as ASSERT() but stays in Release builds #define VERIFY( x ) ( !!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), exit(1), 0 ) ) - - - - - diff --git a/Tools/ToLuaDoxy/Globals.h b/Tools/ToLuaDoxy/Globals.h index b9100a297..869cf0afd 100644 --- a/Tools/ToLuaDoxy/Globals.h +++ b/Tools/ToLuaDoxy/Globals.h @@ -9,17 +9,17 @@ // OS-dependent stuff: #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN - + #define _WIN32_WINNT 0x501 // We want to target WinXP and higher - + #include #include #include // IPv6 stuff - + // Windows SDK defines min and max macros, messing up with our std::min and std::max usage #undef min #undef max - + // Windows SDK defines GetFreeSpace as a constant, probably a Win16 API remnant #ifdef GetFreeSpace #undef GetFreeSpace @@ -43,10 +43,6 @@ #include #include #include - - #if !defined(ANDROID_NDK) - #include - #endif #endif @@ -95,7 +91,3 @@ #define MiB * 1024 * 1024 #define ASSERT assert - - - - -- cgit v1.2.3