summaryrefslogtreecommitdiff
path: root/src/music
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2019-08-03 09:03:01 +0100
committerCharles Pigott <charlespigott@googlemail.com>2019-09-30 14:00:06 +0100
commitb839e355ba6f369a61d15753dc1357e170dcb7d0 (patch)
treec58c30c91eb83cbd1e9801b298cb0897e27fc2a7 /src/music
parent6378a7881793ea3e3562a9e3e06299a49af18050 (diff)
downloadopenttd-b839e355ba6f369a61d15753dc1357e170dcb7d0.tar.xz
Fix: Compilation error on MinGW due to usage of C++17 template deduction
Diffstat (limited to 'src/music')
-rw-r--r--src/music/win32_m.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp
index cb6301a57..777f1185e 100644
--- a/src/music/win32_m.cpp
+++ b/src/music/win32_m.cpp
@@ -328,7 +328,7 @@ void MusicDriver_Win32::PlaySong(const MusicSongInfo &song)
if (!new_song.LoadSong(song)) return;
DEBUG(driver, 2, "Win32-MIDI: PlaySong: Loaded song");
- std::lock_guard mutex_lock(_midi.lock);
+ std::lock_guard<std::mutex> mutex_lock(_midi.lock);
_midi.next_file.MoveFrom(new_song);
_midi.next_segment.start = song.override_start;
@@ -348,7 +348,7 @@ void MusicDriver_Win32::PlaySong(const MusicSongInfo &song)
void MusicDriver_Win32::StopSong()
{
DEBUG(driver, 2, "Win32-MIDI: StopSong: entry");
- std::lock_guard mutex_lock(_midi.lock);
+ std::lock_guard<std::mutex> mutex_lock(_midi.lock);
DEBUG(driver, 2, "Win32-MIDI: StopSong: setting flag");
_midi.do_stop = true;
}
@@ -360,7 +360,7 @@ bool MusicDriver_Win32::IsSongPlaying()
void MusicDriver_Win32::SetVolume(byte vol)
{
- std::lock_guard mutex_lock(_midi.lock);
+ std::lock_guard<std::mutex> mutex_lock(_midi.lock);
_midi.new_volume = vol;
}
@@ -422,7 +422,7 @@ const char *MusicDriver_Win32::Start(const char * const *parm)
void MusicDriver_Win32::Stop()
{
- std::lock_guard mutex_lock(_midi.lock);
+ std::lock_guard<std::mutex> mutex_lock(_midi.lock);
if (_midi.timer_id) {
timeKillEvent(_midi.timer_id);