diff --git a/ext/ghoul b/ext/ghoul index 0a7f66f9a1..57e96a6a8d 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 0a7f66f9a1cb050b9d6e803257ab1320259fa53d +Subproject commit 57e96a6a8d10003eb22aaa471de8eec60d89df2c diff --git a/include/openspace/util/concurrentjobmanager.inl b/include/openspace/util/concurrentjobmanager.inl index a49dff3da9..0816b910c2 100644 --- a/include/openspace/util/concurrentjobmanager.inl +++ b/include/openspace/util/concurrentjobmanager.inl @@ -36,7 +36,7 @@ template void ConcurrentJobManager

::enqueueJob(std::shared_ptr> job) { threadPool.enqueue([this, job]() { job->execute(); - std::lock_guard lock(_finishedJobsMutex); + std::lock_guard lock(_finishedJobsMutex); _finishedJobs.push(job); }); } @@ -50,7 +50,7 @@ template std::shared_ptr> ConcurrentJobManager

::popFinishedJob() { ghoul_assert(!_finishedJobs.empty(), "There is no finished job to pop!"); - std::lock_guard lock(_finishedJobsMutex); + std::lock_guard lock(_finishedJobsMutex); return _finishedJobs.pop(); } diff --git a/modules/sync/syncs/httpsynchronization.cpp b/modules/sync/syncs/httpsynchronization.cpp index 18f2a34c7f..08bbb66953 100644 --- a/modules/sync/syncs/httpsynchronization.cpp +++ b/modules/sync/syncs/httpsynchronization.cpp @@ -228,7 +228,7 @@ bool HttpSynchronization::trySyncFromUrl(std::string listUrl) { return !_shouldCancel; } - std::lock_guard guard(sizeDataMutex); + std::lock_guard guard(sizeDataMutex); sizeData[line] = { p.totalBytesKnown, p.totalBytes, p.downloadedBytes }; diff --git a/modules/sync/syncs/urlsynchronization.cpp b/modules/sync/syncs/urlsynchronization.cpp index d53d79ca49..f0c418b02c 100644 --- a/modules/sync/syncs/urlsynchronization.cpp +++ b/modules/sync/syncs/urlsynchronization.cpp @@ -192,7 +192,7 @@ void UrlSynchronization::start() { &startedAllDownloads, &nDownloads](HttpRequest::Progress p) { if (p.totalBytesKnown) { - std::lock_guard guard(fileSizeMutex); + std::lock_guard guard(fileSizeMutex); fileSizes[url] = p.totalBytes; if (!_nTotalBytesKnown && startedAllDownloads && diff --git a/src/network/parallelpeer.cpp b/src/network/parallelpeer.cpp index 08bee3b496..49c6024433 100644 --- a/src/network/parallelpeer.cpp +++ b/src/network/parallelpeer.cpp @@ -199,7 +199,7 @@ void ParallelPeer::sendAuthentication() { } void ParallelPeer::queueInMessage(const ParallelConnection::Message& message) { - std::lock_guard unqlock(_receiveBufferMutex); + std::lock_guard unqlock(_receiveBufferMutex); _receiveBuffer.push_back(message); } @@ -221,7 +221,7 @@ void ParallelPeer::handleMessage(const ParallelConnection::Message& message) { } void ParallelPeer::analyzeTimeDifference(double messageTimestamp) { - std::lock_guard latencyLock(_latencyMutex); + std::lock_guard latencyLock(_latencyMutex); const double timeDiff = global::windowDelegate->applicationTime() - messageTimestamp; if (_latencyDiffs.empty()) { @@ -235,7 +235,7 @@ void ParallelPeer::analyzeTimeDifference(double messageTimestamp) { } double ParallelPeer::convertTimestamp(double messageTimestamp) { - std::lock_guard latencyLock(_latencyMutex); + std::lock_guard latencyLock(_latencyMutex); return messageTimestamp + _initialTimeDiff + _bufferTime; } @@ -495,7 +495,7 @@ void ParallelPeer::sendScript(std::string script) { void ParallelPeer::resetTimeOffset() { global::navigationHandler->keyframeNavigator().clearKeyframes(); global::timeManager->clearKeyframes(); - std::lock_guard latencyLock(_latencyMutex); + std::lock_guard latencyLock(_latencyMutex); _latencyDiffs.clear(); } diff --git a/src/rendering/loadingscreen.cpp b/src/rendering/loadingscreen.cpp index fcb131de23..451751a54b 100644 --- a/src/rendering/loadingscreen.cpp +++ b/src/rendering/loadingscreen.cpp @@ -283,7 +283,7 @@ void LoadingScreen::render() { glm::vec2 messageLl = glm::vec2(0.f); glm::vec2 messageUr = glm::vec2(0.f); if (_showMessage) { - std::lock_guard guard(_messageMutex); + std::lock_guard guard(_messageMutex); const glm::vec2 bboxMessage = _messageFont->boundingBox(_message); @@ -298,7 +298,7 @@ void LoadingScreen::render() { } if (_showNodeNames) { - std::lock_guard guard(_itemsMutex); + std::lock_guard guard(_itemsMutex); std::chrono::system_clock::time_point now = std::chrono::system_clock::now(); @@ -485,7 +485,7 @@ void LoadingScreen::render() { } void LoadingScreen::postMessage(std::string message) { - std::lock_guard guard(_messageMutex); + std::lock_guard guard(_messageMutex); _message = std::move(message); } @@ -535,7 +535,7 @@ void LoadingScreen::updateItem(const std::string& itemIdentifier, // also would create any of the text information return; } - std::lock_guard guard(_itemsMutex); + std::lock_guard guard(_itemsMutex); auto it = std::find_if( _items.begin(), diff --git a/src/scene/sceneinitializer.cpp b/src/scene/sceneinitializer.cpp index 1e92860d26..9334cb3e62 100644 --- a/src/scene/sceneinitializer.cpp +++ b/src/scene/sceneinitializer.cpp @@ -66,7 +66,7 @@ void MultiThreadedSceneInitializer::initializeNode(SceneGraphNode* node) { } node->initialize(); - std::lock_guard g(_mutex); + std::lock_guard g(_mutex); _initializedNodes.push_back(node); _initializingNodes.erase(node); @@ -94,19 +94,19 @@ void MultiThreadedSceneInitializer::initializeNode(SceneGraphNode* node) { ); } - std::lock_guard g(_mutex); + std::lock_guard g(_mutex); _initializingNodes.insert(node); _threadPool.enqueue(initFunction); } std::vector MultiThreadedSceneInitializer::takeInitializedNodes() { - std::lock_guard g(_mutex); + std::lock_guard g(_mutex); std::vector nodes = std::move(_initializedNodes); return nodes; } bool MultiThreadedSceneInitializer::isInitializing() const { - std::lock_guard g(_mutex); + std::lock_guard g(_mutex); return !_initializingNodes.empty(); } diff --git a/src/scripting/scriptengine.cpp b/src/scripting/scriptengine.cpp index d34b2a1afe..dc917b8de8 100644 --- a/src/scripting/scriptengine.cpp +++ b/src/scripting/scriptengine.cpp @@ -694,7 +694,7 @@ void ScriptEngine::preSync(bool isMaster) { return; } - std::lock_guard guard(_slaveScriptsMutex); + std::lock_guard guard(_slaveScriptsMutex); while (!_incomingScripts.empty()) { QueueItem item = std::move(_incomingScripts.front()); _incomingScripts.pop(); @@ -728,7 +728,7 @@ void ScriptEngine::encode(SyncBuffer* syncBuffer) { void ScriptEngine::decode(SyncBuffer* syncBuffer) { ZoneScoped - std::lock_guard guard(_slaveScriptsMutex); + std::lock_guard guard(_slaveScriptsMutex); size_t nScripts; syncBuffer->decode(nScripts); @@ -757,7 +757,7 @@ void ScriptEngine::postSync(bool isMaster) { } } else { - std::lock_guard guard(_slaveScriptsMutex); + std::lock_guard guard(_slaveScriptsMutex); while (!_slaveScriptQueue.empty()) { try { runScript(_slaveScriptQueue.front()); diff --git a/src/util/camera.cpp b/src/util/camera.cpp index 4091bdb45b..551f129099 100644 --- a/src/util/camera.cpp +++ b/src/util/camera.cpp @@ -258,7 +258,7 @@ const glm::mat4& Camera::SgctInternal::projectionMatrix() const { const glm::mat4& Camera::SgctInternal::viewProjectionMatrix() const { //if (_cachedViewProjectionMatrix.isDirty) { - std::lock_guard _lock(_mutex); + std::lock_guard _lock(_mutex); _cachedViewProjectionMatrix.datum = _projectionMatrix * _viewMatrix; _cachedViewProjectionMatrix.isDirty = false; //} diff --git a/src/util/httprequest.cpp b/src/util/httprequest.cpp index 2250aa80f9..fe5c982b7d 100644 --- a/src/util/httprequest.cpp +++ b/src/util/httprequest.cpp @@ -245,7 +245,7 @@ AsyncHttpDownload::AsyncHttpDownload(AsyncHttpDownload&& d) {} void AsyncHttpDownload::start(HttpRequest::RequestOptions opt) { - std::lock_guard guard(_stateChangeMutex); + std::lock_guard guard(_stateChangeMutex); if (hasStarted()) { return; } @@ -286,7 +286,7 @@ void AsyncHttpDownload::download(HttpRequest::RequestOptions opt) { _httpRequest.onProgress([this](HttpRequest::Progress p) { // Return a non-zero value to cancel download // if onProgress returns false. - //std::lock_guard guard(_mutex); + //std::lock_guard guard(_mutex); const bool shouldContinue = callOnProgress(p); if (!shouldContinue) { return 1; diff --git a/src/util/synchronizationwatcher.cpp b/src/util/synchronizationwatcher.cpp index 5c14833970..98c724219d 100644 --- a/src/util/synchronizationwatcher.cpp +++ b/src/util/synchronizationwatcher.cpp @@ -41,7 +41,7 @@ SynchronizationWatcher::WatchHandle SynchronizationWatcher::watchSynchronization [this, synchronization, watchHandle, cb = std::move(callback)] (ResourceSynchronization::State state) { - std::lock_guard g(_mutex); + std::lock_guard g(_mutex); _pendingNotifications.push_back({ synchronization, state, watchHandle, cb }); } );