diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2021-01-08 10:16:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 11:16:18 +0100 |
commit | 9b800a96ed32720ff60b74e498a0e0a6351004f9 (patch) | |
tree | 3f287d339e15c4902ee415556475fd9b2918d33c /src/music | |
parent | c1fddb9a6ae5c3af6865461a7295788a341011a2 (diff) | |
download | openttd-9b800a96ed32720ff60b74e498a0e0a6351004f9.tar.xz |
Codechange: Remove min/max functions in favour of STL variants (#8502)
Diffstat (limited to 'src/music')
-rw-r--r-- | src/music/dmusic.cpp | 1 | ||||
-rw-r--r-- | src/music/midifile.cpp | 1 | ||||
-rw-r--r-- | src/music/win32_m.cpp | 2 |
3 files changed, 1 insertions, 3 deletions
diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp index e8b095225..3843f4df1 100644 --- a/src/music/dmusic.cpp +++ b/src/music/dmusic.cpp @@ -25,7 +25,6 @@ #include <windows.h> #include <dmksctrl.h> #include <dmusicc.h> -#include <algorithm> #include <mutex> #include "../safeguards.h" diff --git a/src/music/midifile.cpp b/src/music/midifile.cpp index 59cc2a631..4bdd3e4e3 100644 --- a/src/music/midifile.cpp +++ b/src/music/midifile.cpp @@ -14,7 +14,6 @@ #include "../core/endian_func.hpp" #include "../base_media_base.h" #include "midi.h" -#include <algorithm> #include "../console_func.h" #include "../console_internal.h" diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp index 249fc5b6d..792cff5af 100644 --- a/src/music/win32_m.cpp +++ b/src/music/win32_m.cpp @@ -407,7 +407,7 @@ const char *MusicDriver_Win32::Start(const StringList &parm) /* prepare multimedia timer */ TIMECAPS timecaps; if (timeGetDevCaps(&timecaps, sizeof(timecaps)) == MMSYSERR_NOERROR) { - _midi.time_period = min(max((UINT)resolution, timecaps.wPeriodMin), timecaps.wPeriodMax); + _midi.time_period = std::min(std::max((UINT)resolution, timecaps.wPeriodMin), timecaps.wPeriodMax); if (timeBeginPeriod(_midi.time_period) == MMSYSERR_NOERROR) { /* success */ DEBUG(driver, 2, "Win32-MIDI: Start: timer resolution is %d", (int)_midi.time_period); |