diff options
| author | Timotej Lazar <timotej.lazar@araneo.si> | 2022-06-12 16:53:06 +0200 |
|---|---|---|
| committer | Timotej Lazar <timotej.lazar@araneo.si> | 2022-06-12 16:53:06 +0200 |
| commit | 1e38669119d4ce3e06bbad603799e32e6fd7feb2 (patch) | |
| tree | e787ac4dac41be1f8bcdbeab22c3bbee64f0d8b7 /src/win95/ltchunk.cpp | |
| parent | 0aa9a623f3b38e35b7f1cd26da0237beca2c9988 (diff) | |
Replace max macro with std::max in C++ code
Fixes compilation on Guix with gcc 12. Not sure which of those is
relevant.
Diffstat (limited to 'src/win95/ltchunk.cpp')
| -rw-r--r-- | src/win95/ltchunk.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/win95/ltchunk.cpp b/src/win95/ltchunk.cpp index 78bd44f..a258467 100644 --- a/src/win95/ltchunk.cpp +++ b/src/win95/ltchunk.cpp @@ -1,3 +1,5 @@ +#include <algorithm> + #include "chunk.hpp" #include "ltchunk.hpp" @@ -331,8 +333,8 @@ int Light_Scale_Chunk::ApplyPrelightScale(int l) l+=(prelight_add-prelight_multiply_above); l= (int)(l*prelight_multiply); l+=prelight_multiply_above; - l=min(l,255); - return max(l,prelight_multiply_above); + l=std::min(l,255); + return std::max(l,prelight_multiply_above); } int Light_Scale_Chunk::ApplyRuntimeScale(int l) { @@ -340,8 +342,8 @@ int Light_Scale_Chunk::ApplyRuntimeScale(int l) l+=(runtime_add-runtime_multiply_above); l=(int)( l*runtime_multiply); l+=runtime_multiply_above; - l=min(l,255); - return max(l,runtime_multiply_above); + l=std::min(l,255); + return std::max(l,runtime_multiply_above); } //////////////////////////////////////////////////////////////////////////////////// RIF_IMPLEMENT_DYNCREATE("PLOBJLIT",Placed_Object_Light_Chunk) |
