summaryrefslogtreecommitdiff
path: root/src/audiofile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/audiofile.cc')
-rw-r--r--src/audiofile.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/audiofile.cc b/src/audiofile.cc
index 2d61eb5..3f59fcf 100644
--- a/src/audiofile.cc
+++ b/src/audiofile.cc
@@ -61,7 +61,7 @@ bool AudioFile::isValid() const
void AudioFile::unload()
{
// Make sure we don't unload the object while loading it...
- std::lock_guard<std::mutex> guard(mutex);
+ const std::lock_guard<std::mutex> guard(mutex);
is_loaded = false;
@@ -76,7 +76,7 @@ void AudioFile::unload()
void AudioFile::load(LogFunction logger, std::size_t sample_limit)
{
// Make sure we don't unload the object while loading it...
- std::lock_guard<std::mutex> guard(mutex);
+ const std::lock_guard<std::mutex> guard(mutex);
if(this->data) // already loaded
{