From 3a57a2204815e1741f039ad0aa8a17897ca201ea Mon Sep 17 00:00:00 2001 From: Rodolfo Ribeiro Gomes Date: Dec 04 2019 10:06:14 +0000 Subject: remove unused variable and lockguards the directive ETL_LOCK_REFCOUNTS is never defined --- diff --git a/synfig-core/src/synfig/rendering/resource.cpp b/synfig-core/src/synfig/rendering/resource.cpp index bb80ccf..11c09f5 100644 --- a/synfig-core/src/synfig/rendering/resource.cpp +++ b/synfig-core/src/synfig/rendering/resource.cpp @@ -53,28 +53,18 @@ Resource::Storage::~Storage() { } void Resource::Storage::ref() const { - #ifdef ETL_LOCK_REFCOUNTS - std::lock_guard lock(mtx); - #endif ++refcount; } bool Resource::Storage::unref_inactive() const { - #ifdef ETL_LOCK_REFCOUNTS - std::lock_guard lock(mtx); - #endif return refcount == 0 || --refcount != (int)resources.size(); } bool Resource::Storage::unref() const { - #ifdef ETL_LOCK_REFCOUNTS - std::lock_guard lock(mtx); - #endif - if (refcount == 0) return true; if (--refcount == (int)resources.size()) { @@ -91,9 +81,6 @@ Resource::Storage::unref() const int Resource::Storage::count() const { - #ifdef ETL_LOCK_REFCOUNTS - std::lock_guard lock(mtx); - #endif return refcount; } diff --git a/synfig-core/src/synfig/rendering/resource.h b/synfig-core/src/synfig/rendering/resource.h index 9d39e16..283e9fc 100644 --- a/synfig-core/src/synfig/rendering/resource.h +++ b/synfig-core/src/synfig/rendering/resource.h @@ -63,9 +63,6 @@ public: private: mutable int refcount; - #ifdef ETL_LOCK_REFCOUNTS - mutable std::mutex mtx; - #endif friend class Resource;