diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-12-22 21:19:13 +0100 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-12-22 21:19:13 +0100 |
commit | 3389b234ae96f57518f994003d66ed219e5f9030 (patch) | |
tree | ed777b22dce19a4914f4586f7a93c9c3721208b5 /Tools/ProtoProxy/Globals.h | |
parent | Merge pull request #2790 from Gargaj/waterbottle (diff) | |
parent | Removed offending tr1 references. (diff) | |
download | cuberite-3389b234ae96f57518f994003d66ed219e5f9030.tar cuberite-3389b234ae96f57518f994003d66ed219e5f9030.tar.gz cuberite-3389b234ae96f57518f994003d66ed219e5f9030.tar.bz2 cuberite-3389b234ae96f57518f994003d66ed219e5f9030.tar.lz cuberite-3389b234ae96f57518f994003d66ed219e5f9030.tar.xz cuberite-3389b234ae96f57518f994003d66ed219e5f9030.tar.zst cuberite-3389b234ae96f57518f994003d66ed219e5f9030.zip |
Diffstat (limited to '')
-rw-r--r-- | Tools/ProtoProxy/Globals.h | 49 |
1 files changed, 16 insertions, 33 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 <Windows.h> #include <winsock2.h> #include <ws2tcpip.h> - + // 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 <sys/types.h> @@ -138,7 +138,7 @@ typedef unsigned char Byte; #include <semaphore.h> #include <errno.h> #include <fcntl.h> - + typedef int SOCKET; enum { @@ -146,9 +146,6 @@ typedef unsigned char Byte; }; #define closesocket close #define SocketError errno -#if !defined(ANDROID_NDK) - #include <tr1/memory> -#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 <memory> included earlier - #define SharedPtr std::tr1::shared_ptr -#elif (defined(_MSC_VER) || (__cplusplus >= 201103L)) - // C++11 has std::shared_ptr in <memory>, included earlier - #define SharedPtr std::shared_ptr -#else - // C++03 has std::tr1::shared_ptr in <tr1/memory> - #include <tr1/memory> - #define SharedPtr std::tr1::shared_ptr -#endif +// C++11 has std::shared_ptr in <memory>, 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; } ; - - - - |