summaryrefslogtreecommitdiffstats
path: root/Tools/ProtoProxy/Globals.h
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-07-29 22:04:00 +0200
committerarchshift <admin@archshift.com>2014-07-29 22:04:00 +0200
commita9b597087b56b4526a3f6447789ba141568575a1 (patch)
treea08542d77b5668a25ca5e00492577ed6f4d61a9a /Tools/ProtoProxy/Globals.h
parentSpacing fixes and a few more BLOCK_META constants. (diff)
parentSlight cleanup after portals (diff)
downloadcuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.gz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.bz2
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.lz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.xz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.zst
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.zip
Diffstat (limited to 'Tools/ProtoProxy/Globals.h')
-rw-r--r--Tools/ProtoProxy/Globals.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/Tools/ProtoProxy/Globals.h b/Tools/ProtoProxy/Globals.h
index e2f5aa860..a9b5aa1b1 100644
--- a/Tools/ProtoProxy/Globals.h
+++ b/Tools/ProtoProxy/Globals.h
@@ -216,6 +216,20 @@ 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
+
@@ -232,12 +246,6 @@ public:
-#include "../../src/Crypto.h"
-
-
-
-
-
#define LOGERROR printf
#define LOGINFO printf
#define LOGWARNING printf