- try to fix mac build

This commit is contained in:
SoftCoder
2016-01-18 15:29:16 -08:00
parent b50fe04e0a
commit 0d8377d6b4
15 changed files with 42 additions and 45 deletions

View File

@@ -17,16 +17,13 @@
// =====================================================
// Hack for compilers that dont support cxx11's unique_ptr which replaces auto_ptr
// =====================================================
using namespace std;
//using namespace std;
// C++11
#if !defined(HAVE_CXX11) && !defined(__GXX_EXPERIMENTAL_CXX0X__) && (__cplusplus < 201103L) && (_MSC_VER < 1900)
#ifdef __APPLE__
template<typename T>
using unique_ptr = auto_ptr<T>;
#else
#define unique_ptr auto_ptr
#endif
#if defined(HAVE_CXX11) || (__cplusplus >= 201103L) || (_MSC_VER >= 1900)
#define auto_ptr std::unique_ptr
#endif
#endif

View File

@@ -70,7 +70,7 @@ public:
private:
SDL_Thread* thread;
//std::unique_ptr<Mutex> mutexthreadAccessor;
//std::auto_ptr<Mutex> mutexthreadAccessor;
Mutex *mutexthreadAccessor;
ThreadState currentState;
bool threadObjectValid();
@@ -129,7 +129,7 @@ private:
Shared::PlatformCommon::Chrono *chronoPerf;
bool isStaticMutexListMutex;
static unique_ptr<Mutex> mutexMutexList;
static auto_ptr<Mutex> mutexMutexList;
static vector<Mutex *> mutexList;
public: