mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-31 18:39:10 +00:00
Codechange: Remove min/max functions in favour of STL variants (#8502)
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#include <windows.h>
|
||||
#include <dmksctrl.h>
|
||||
#include <dmusicc.h>
|
||||
#include <algorithm>
|
||||
#include <mutex>
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
@@ -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"
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user