From 5fe9fd0fc62f91e9b4a3f276fdce46df0015a40a Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Tue, 16 Nov 2021 09:42:52 +0000 Subject: [PATCH] simgear/props/props.cxx: moved common members into SGPropertyLock base class. --- simgear/props/props.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/simgear/props/props.cxx b/simgear/props/props.cxx index f5dd9ca2..f9d1ce40 100755 --- a/simgear/props/props.cxx +++ b/simgear/props/props.cxx @@ -381,6 +381,9 @@ struct SGPropertyLock if (shared) node._mutex.unlock_shared(); else node._mutex.unlock(); } + + const SGPropertyNode* m_node = nullptr; + bool m_own = false; }; /* Scoped exclusive lock of a SGPropertyNode. */ @@ -424,9 +427,6 @@ struct SGPropertyLockExclusive : SGPropertyLock { if (m_own) release(); } - - const SGPropertyNode* m_node = nullptr; - bool m_own = false; private: SGPropertyLockExclusive(const SGPropertyLockExclusive&); @@ -437,8 +437,7 @@ struct SGPropertyLockShared : SGPropertyLock { SGPropertyLockShared() : - SGPropertyLock(), - m_node(nullptr) + SGPropertyLock() { } @@ -477,9 +476,6 @@ struct SGPropertyLockShared : SGPropertyLock { if (m_own) release(); } - - const SGPropertyNode* m_node = nullptr; - bool m_own = false; private: SGPropertyLockShared(const SGPropertyLockShared&);