diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-10-20 20:01:53 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-10-20 20:01:53 +0200 |
commit | 2334c8dd9d6a295e3c445e548b5902c9f49ab532 (patch) | |
tree | 914eb4019ea6ca8e1f3c92198b910c05f3a6ecbc /src/Globals.h | |
parent | Migrated cSleep and cTimer to std::chrono (diff) | |
parent | Merge pull request #1554 from SphinxC0re/master (diff) | |
download | cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar.gz cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar.bz2 cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar.lz cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar.xz cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.tar.zst cuberite-2334c8dd9d6a295e3c445e548b5902c9f49ab532.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Globals.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/Globals.h b/src/Globals.h index b90542af0..8658b49c4 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -361,19 +361,8 @@ void inline LOGD(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 +// Unified shared ptr from before C++11. Also no silly undercores. +#define SharedPtr std::shared_ptr |