1
0

Removed offending tr1 references.

This commit is contained in:
Alexander Harkness 2015-12-22 19:50:42 +00:00
parent 2b27bf9f22
commit 16d0bc10a4
4 changed files with 34 additions and 83 deletions

View File

@ -146,9 +146,6 @@ typedef unsigned char Byte;
}; };
#define closesocket close #define closesocket close
#define SocketError errno #define SocketError errno
#if !defined(ANDROID_NDK)
#include <tr1/memory>
#endif
#endif #endif
#if !defined(ANDROID_NDK) #if !defined(ANDROID_NDK)
@ -218,19 +215,9 @@ typedef unsigned char Byte;
// Pretty much the same as ASSERT() but stays in Release builds // 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 ) ) #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: // C++11 has std::shared_ptr in <memory>, included earlier
// Note that we cannot typedef, because C++ doesn't allow (partial) templates to be typedeffed. #define SharedPtr std::shared_ptr
#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
@ -243,7 +230,3 @@ public:
/// Called for each item in the internal list; return true to stop the loop, or false to continue enumerating /// 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; virtual bool Item(Type * a_Type) = 0;
} ; } ;

View File

@ -330,19 +330,8 @@ void inline LOGERROR(const char* a_Format, ...)
#define assert_test(x) ( !!(x) || (assert(!#x), exit(1), 0)) #define assert_test(x) ( !!(x) || (assert(!#x), exit(1), 0))
#endif #endif
// Allow both Older versions of MSVC and newer versions of everything use a shared_ptr: // C++11 has std::shared_ptr in <memory>, included earlier
// Note that we cannot typedef, because C++ doesn't allow (partial) templates to be typedeffed. #define SharedPtr std::shared_ptr
#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
@ -385,8 +374,3 @@ T Clamp(T a_Value, T a_Min, T a_Max)
#include "src/BiomeDef.h" #include "src/BiomeDef.h"
#include "src/BlockID.h" #include "src/BlockID.h"
#include "src/BlockInfo.h" #include "src/BlockInfo.h"

View File

@ -164,9 +164,6 @@ typedef unsigned char Byte;
#include <semaphore.h> #include <semaphore.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#if !defined(ANDROID_NDK)
#include <tr1/memory>
#endif
#endif #endif
#if !defined(ANDROID_NDK) #if !defined(ANDROID_NDK)
@ -239,8 +236,3 @@ typedef unsigned char Byte;
// Pretty much the same as ASSERT() but stays in Release builds // 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 ) ) #define VERIFY( x ) ( !!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), exit(1), 0 ) )

View File

@ -43,10 +43,6 @@
#include <semaphore.h> #include <semaphore.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#if !defined(ANDROID_NDK)
#include <tr1/memory>
#endif
#endif #endif
@ -95,7 +91,3 @@
#define MiB * 1024 * 1024 #define MiB * 1024 * 1024
#define ASSERT assert #define ASSERT assert