mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 02:43:57 +02:00
- atempt to cleanup use fo auto_ptr
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// ==============================================================
|
||||
// This file is part of Glest Shared Library (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2005 Matthias Braun <matze@braunis.de>
|
||||
//
|
||||
// You can redistribute this code and/or modify it under
|
||||
// the terms of the GNU General Public License as published
|
||||
// by the Free Software Foundation; either version 2 of the
|
||||
// License, or (at your option) any later version
|
||||
// ==============================================================
|
||||
|
||||
#ifndef _COMMON_SCOPED_PTR_H_
|
||||
#define _COMMON_SCOPED_PTR_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
// =====================================================
|
||||
// class Thread
|
||||
// =====================================================
|
||||
using namespace std;
|
||||
|
||||
#if !defined(HAVE_CXX11) && !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
#define unique_ptr auto_ptr
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -19,6 +19,7 @@
|
||||
#include <SDL_mutex.h>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include "common_scoped_ptr.h"
|
||||
|
||||
#include "data_types.h"
|
||||
#ifdef DEBUG_PERFORMANCE_MUTEXES
|
||||
@@ -69,7 +70,7 @@ public:
|
||||
|
||||
private:
|
||||
SDL_Thread* thread;
|
||||
//std::auto_ptr<Mutex> mutexthreadAccessor;
|
||||
//std::unique_ptr<Mutex> mutexthreadAccessor;
|
||||
Mutex *mutexthreadAccessor;
|
||||
ThreadState currentState;
|
||||
bool threadObjectValid();
|
||||
@@ -128,7 +129,7 @@ private:
|
||||
Shared::PlatformCommon::Chrono *chronoPerf;
|
||||
|
||||
bool isStaticMutexListMutex;
|
||||
static auto_ptr<Mutex> mutexMutexList;
|
||||
static unique_ptr<Mutex> mutexMutexList;
|
||||
static vector<Mutex *> mutexList;
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user