1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

replace boost::recursive_mutex with std

This commit is contained in:
Laserlicht
2025-02-28 14:08:32 +01:00
parent 8f074490a7
commit 3fb9260f3b
2 changed files with 6 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ template<typename T>
class ThreadSafeProxy
{
public:
ThreadSafeProxy(T& resource, boost::recursive_mutex& mutex)
ThreadSafeProxy(T& resource, std::recursive_mutex& mutex)
: resourceRef(resource), lock(mutex) {}
T* operator->() { return &resourceRef; }
@@ -66,7 +66,7 @@ public:
private:
T& resourceRef;
std::lock_guard<boost::recursive_mutex> lock;
std::lock_guard<std::recursive_mutex> lock;
};
class Zone : public rmg::ZoneOptions
@@ -130,8 +130,8 @@ public:
vstd::RNG & getRand();
public:
mutable boost::recursive_mutex areaMutex;
using Lock = boost::unique_lock<boost::recursive_mutex>;
mutable std::recursive_mutex areaMutex;
using Lock = boost::unique_lock<std::recursive_mutex>;
protected:
CMapGenerator & generator;

View File

@@ -62,8 +62,8 @@ protected:
bool finished = false;
mutable boost::recursive_mutex externalAccessMutex; //Used to communicate between Modificators
using RecursiveLock = boost::unique_lock<boost::recursive_mutex>;
mutable std::recursive_mutex externalAccessMutex; //Used to communicate between Modificators
using RecursiveLock = boost::unique_lock<std::recursive_mutex>;
using Lock = boost::unique_lock<boost::shared_mutex>;
private: