Răsfoiți Sursa

replace boost::recursive_mutex with std

Laserlicht 7 luni în urmă
părinte
comite
3fb9260f3b
2 a modificat fișierele cu 6 adăugiri și 6 ștergeri
  1. 4 4
      lib/rmg/Zone.h
  2. 2 2
      lib/rmg/modificators/Modificator.h

+ 4 - 4
lib/rmg/Zone.h

@@ -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;

+ 2 - 2
lib/rmg/modificators/Modificator.h

@@ -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: