summaryrefslogtreecommitdiffstats
path: root/src/Globals.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-24 22:30:19 +0200
committermadmaxoft <github@xoft.cz>2014-04-24 22:30:19 +0200
commita02e8e8021147783b011d9a2f99ba3f1128ae8e8 (patch)
tree556c9e6390062b1a034be72f4b64cc7c5b075298 /src/Globals.h
parentFixed filename case. (diff)
downloadcuberite-a02e8e8021147783b011d9a2f99ba3f1128ae8e8.tar
cuberite-a02e8e8021147783b011d9a2f99ba3f1128ae8e8.tar.gz
cuberite-a02e8e8021147783b011d9a2f99ba3f1128ae8e8.tar.bz2
cuberite-a02e8e8021147783b011d9a2f99ba3f1128ae8e8.tar.lz
cuberite-a02e8e8021147783b011d9a2f99ba3f1128ae8e8.tar.xz
cuberite-a02e8e8021147783b011d9a2f99ba3f1128ae8e8.tar.zst
cuberite-a02e8e8021147783b011d9a2f99ba3f1128ae8e8.zip
Diffstat (limited to 'src/Globals.h')
-rw-r--r--src/Globals.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Globals.h b/src/Globals.h
index 3d7c9707c..2e7e0c9cf 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -267,7 +267,15 @@ template class SizeChecker<UInt16, 2>;
#define assert_test(x) ( !!(x) || (assert(!#x), exit(1), 0))
#endif
-#define SharedPtr std::tr1::shared_ptr
+// 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
+ #define SharedPtr std::tr1::shared_ptr
+#else
+ // All others have std::shared ptr
+ #define SharedPtr std::shared_ptr
+#endif