Use scoped lock instead of directly locking/unlocking mutex

experimental
Kyle Cooley 7 years ago
parent 3b9326d238
commit 679a284735

@ -721,9 +721,8 @@ namespace Resource
{ {
ResourceManager::clearCache(); ResourceManager::clearCache();
mSharedStateMutex.lock(); OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mSharedStateMutex);
mSharedStateManager->clearCache(); mSharedStateManager->clearCache();
mSharedStateMutex.unlock();
} }
void SceneManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const void SceneManager::reportStats(unsigned int frameNumber, osg::Stats *stats) const

Loading…
Cancel
Save