simgear/props/props.cxx: moved common members into SGPropertyLock base class.
This commit is contained in:
parent
23b3824170
commit
5fe9fd0fc6
@ -381,6 +381,9 @@ struct SGPropertyLock
|
|||||||
if (shared) node._mutex.unlock_shared();
|
if (shared) node._mutex.unlock_shared();
|
||||||
else node._mutex.unlock();
|
else node._mutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SGPropertyNode* m_node = nullptr;
|
||||||
|
bool m_own = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Scoped exclusive lock of a SGPropertyNode. */
|
/* Scoped exclusive lock of a SGPropertyNode. */
|
||||||
@ -424,9 +427,6 @@ struct SGPropertyLockExclusive : SGPropertyLock
|
|||||||
{
|
{
|
||||||
if (m_own) release();
|
if (m_own) release();
|
||||||
}
|
}
|
||||||
|
|
||||||
const SGPropertyNode* m_node = nullptr;
|
|
||||||
bool m_own = false;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SGPropertyLockExclusive(const SGPropertyLockExclusive&);
|
SGPropertyLockExclusive(const SGPropertyLockExclusive&);
|
||||||
@ -437,8 +437,7 @@ struct SGPropertyLockShared : SGPropertyLock
|
|||||||
{
|
{
|
||||||
SGPropertyLockShared()
|
SGPropertyLockShared()
|
||||||
:
|
:
|
||||||
SGPropertyLock(),
|
SGPropertyLock()
|
||||||
m_node(nullptr)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -477,9 +476,6 @@ struct SGPropertyLockShared : SGPropertyLock
|
|||||||
{
|
{
|
||||||
if (m_own) release();
|
if (m_own) release();
|
||||||
}
|
}
|
||||||
|
|
||||||
const SGPropertyNode* m_node = nullptr;
|
|
||||||
bool m_own = false;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SGPropertyLockShared(const SGPropertyLockShared&);
|
SGPropertyLockShared(const SGPropertyLockShared&);
|
||||||
|
Loading…
Reference in New Issue
Block a user