mirror of
https://github.com/overte-org/overte.git
synced 2025-07-05 07:09:41 +02:00
Fix ignored return value warning
warning: ignoring return value of ‘std::lock_guard<_Mutex>::lock_guard(mutex_type&) [with _Mutex = std::mutex; mutex_type = std::mutex]’, declared with attribute ‘nodiscard’ [-Wunused-result] This may mean the lock wasn't actually being taken.
This commit is contained in:
parent
9cb35541d3
commit
84b16f44aa
1 changed files with 12 additions and 12 deletions
|
@ -64,7 +64,7 @@ void LODManager::setRenderTimes(float presentTime, float engineRunTime, float ba
|
|||
}
|
||||
|
||||
void LODManager::autoAdjustLOD(float realTimeDelta) {
|
||||
std::lock_guard<std::mutex> { _automaticLODLock };
|
||||
std::lock_guard<std::mutex> lock{ _automaticLODLock };
|
||||
|
||||
// The "render time" is the worse of:
|
||||
// - engineRunTime: Time spent in the render thread in the engine producing the gpu::Frame N
|
||||
|
@ -300,7 +300,7 @@ void LODManager::resetLODAdjust() {
|
|||
}
|
||||
|
||||
void LODManager::setAutomaticLODAdjust(bool value) {
|
||||
std::lock_guard<std::mutex> { _automaticLODLock };
|
||||
std::lock_guard<std::mutex> lock{ _automaticLODLock };
|
||||
_automaticLODAdjust = value;
|
||||
saveSettings();
|
||||
emit autoLODChanged();
|
||||
|
|
Loading…
Reference in a new issue