diff options
author | Paramat <paramat@users.noreply.github.com> | 2017-09-27 22:03:41 +0100 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2018-06-03 17:31:59 +0200 |
commit | bd8d6f8f2f23fb4b4b4ab274bc6356aa141a31ef (patch) | |
tree | 71ff2b8adcf1b8414d45cd78a0dde0ee5d3f22b7 /src | |
parent | 3a9d500396b327d04439bb5f629d8d713c228e89 (diff) | |
download | minetest-bd8d6f8f2f23fb4b4b4ab274bc6356aa141a31ef.tar.gz minetest-bd8d6f8f2f23fb4b4b4ab274bc6356aa141a31ef.tar.bz2 minetest-bd8d6f8f2f23fb4b4b4ab274bc6356aa141a31ef.zip |
Fix recent commit: std::max -> std::fmax for floats (#6469)
Fixes commit a455297d297c0819a7eff89e51e5f01a5ac731c3
<cmath> header was already present in commit.
Diffstat (limited to 'src')
-rw-r--r-- | src/sound_openal.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sound_openal.cpp b/src/sound_openal.cpp index 20633404e..1bad04b9c 100644 --- a/src/sound_openal.cpp +++ b/src/sound_openal.cpp @@ -408,7 +408,7 @@ public: alSource3f(sound->source_id, AL_POSITION, 0, 0, 0); alSource3f(sound->source_id, AL_VELOCITY, 0, 0, 0); alSourcei(sound->source_id, AL_LOOPING, loop ? AL_TRUE : AL_FALSE); - volume = std::max(0.0f, volume); + volume = std::fmax(0.0f, volume); alSourcef(sound->source_id, AL_GAIN, volume); alSourcePlay(sound->source_id); warn_if_error(alGetError(), "createPlayingSound"); @@ -436,7 +436,7 @@ public: alSourcei(sound->source_id, AL_LOOPING, loop ? AL_TRUE : AL_FALSE); // Multiply by 3 to compensate for reducing AL_REFERENCE_DISTANCE from // the previous value of 30 to the new value of 10 - volume = std::max(0.0f, volume * 3.0f); + volume = std::fmax(0.0f, volume * 3.0f); alSourcef(sound->source_id, AL_GAIN, volume); alSourcePlay(sound->source_id); warn_if_error(alGetError(), "createPlayingSoundAt"); |