summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-12-22 21:19:13 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-12-22 21:19:13 +0100
commit3389b234ae96f57518f994003d66ed219e5f9030 (patch)
treeed777b22dce19a4914f4586f7a93c9c3721208b5
parentMerge pull request #2790 from Gargaj/waterbottle (diff)
parentRemoved offending tr1 references. (diff)
downloadcuberite-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
-rw-r--r--Tools/ProtoProxy/Globals.h49
-rw-r--r--Tools/QtBiomeVisualiser/Globals.h20
-rw-r--r--Tools/RCONClient/Globals.h32
-rw-r--r--Tools/ToLuaDoxy/Globals.h16
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 <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;
} ;
-
-
-
-
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 <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
@@ -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 <cmath>
@@ -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 <Windows.h>
#include <winsock2.h>
#include <Ws2tcpip.h> // 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 <semaphore.h>
#include <errno.h>
#include <fcntl.h>
-#if !defined(ANDROID_NDK)
- #include <tr1/memory>
-#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 <Windows.h>
#include <winsock2.h>
#include <Ws2tcpip.h> // 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 <semaphore.h>
#include <errno.h>
#include <fcntl.h>
-
- #if !defined(ANDROID_NDK)
- #include <tr1/memory>
- #endif
#endif
@@ -95,7 +91,3 @@
#define MiB * 1024 * 1024
#define ASSERT assert
-
-
-
-