summaryrefslogtreecommitdiff
path: root/src/music/win32_m.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2021-01-08 10:16:18 +0000
committerGitHub <noreply@github.com>2021-01-08 11:16:18 +0100
commit9b800a96ed32720ff60b74e498a0e0a6351004f9 (patch)
tree3f287d339e15c4902ee415556475fd9b2918d33c /src/music/win32_m.cpp
parentc1fddb9a6ae5c3af6865461a7295788a341011a2 (diff)
downloadopenttd-9b800a96ed32720ff60b74e498a0e0a6351004f9.tar.xz
Codechange: Remove min/max functions in favour of STL variants (#8502)
Diffstat (limited to 'src/music/win32_m.cpp')
-rw-r--r--src/music/win32_m.cpp2
1 files changed, 1 insertions, 1 deletions
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);