mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 11:19:48 +02:00
- try to fix mac build
This commit is contained in:
@@ -315,7 +315,7 @@ private:
|
||||
|
||||
static vector<vector<unsigned char> > nextColorIDReuseList;
|
||||
|
||||
static unique_ptr<PixelBufferWrapper> pbo;
|
||||
static auto_ptr<PixelBufferWrapper> pbo;
|
||||
|
||||
void assign_color();
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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:
|
||||
|
@@ -1896,7 +1896,7 @@ const unsigned int BaseColorPickEntity::k = 43067;
|
||||
unsigned int BaseColorPickEntity::nextColorRGB = BaseColorPickEntity::k;
|
||||
|
||||
unsigned char BaseColorPickEntity::nextColorID[COLOR_COMPONENTS] = { 1, 1, 1, 0 };
|
||||
unique_ptr<PixelBufferWrapper> BaseColorPickEntity::pbo;
|
||||
auto_ptr<PixelBufferWrapper> BaseColorPickEntity::pbo;
|
||||
|
||||
map<string,bool> BaseColorPickEntity::usedColorIDList;
|
||||
bool BaseColorPickEntity::trackColorUse = true;
|
||||
@@ -2128,7 +2128,7 @@ vector<int> BaseColorPickEntity::getPickedList(int x,int y,int w,int h,
|
||||
pickedModels.reserve(rendererModels.size());
|
||||
|
||||
//printf("In [%s::%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||
static unique_ptr<Pixmap2D> cachedPixels;
|
||||
static auto_ptr<Pixmap2D> cachedPixels;
|
||||
|
||||
if(rendererModels.empty() == false) {
|
||||
if(PixelBufferWrapper::getIsPBOEnable() == true) {
|
||||
|
@@ -27,15 +27,15 @@ bool Thread::enableVerboseMode = false;
|
||||
Mutex Thread::mutexthreadList;
|
||||
vector<Thread *> Thread::threadList;
|
||||
|
||||
unique_ptr<Mutex> Mutex::mutexMutexList(new Mutex(CODE_AT_LINE));
|
||||
auto_ptr<Mutex> Mutex::mutexMutexList(new Mutex(CODE_AT_LINE));
|
||||
vector<Mutex *> Mutex::mutexList;
|
||||
|
||||
class ThreadGarbageCollector;
|
||||
class Mutex;
|
||||
class MutexSafeWrapper;
|
||||
|
||||
static unique_ptr<ThreadGarbageCollector> cleanupThread;
|
||||
static unique_ptr<Mutex> cleanupThreadMutex(new Mutex(CODE_AT_LINE));
|
||||
static auto_ptr<ThreadGarbageCollector> cleanupThread;
|
||||
static auto_ptr<Mutex> cleanupThreadMutex(new Mutex(CODE_AT_LINE));
|
||||
|
||||
class ThreadGarbageCollector : public BaseThread
|
||||
{
|
||||
@@ -546,7 +546,7 @@ inline void Mutex::p() {
|
||||
// snprintf(szBuf,8095,"In [%s::%s Line: %d] mutex == NULL refCount = %d owner [%s] deleteownerId [%s] stack: %s",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,refCount,ownerId.c_str(),deleteownerId.c_str(),stack.c_str());
|
||||
// throw megaglest_runtime_error(szBuf);
|
||||
// }
|
||||
// std::unique_ptr<Chrono> chronoLockPerf;
|
||||
// std::auto_ptr<Chrono> chronoLockPerf;
|
||||
// if(debugMutexLock == true) {
|
||||
// chronoLockPerf.reset(new Chrono());
|
||||
// chronoLockPerf->start();
|
||||
|
Reference in New Issue
Block a user