diff --git a/src/core/Math.hpp b/src/core/Math.hpp index 939159db08..30bcd3143f 100644 --- a/src/core/Math.hpp +++ b/src/core/Math.hpp @@ -1,5 +1,7 @@ #pragma once +#include + /** * Common mathematical functions. */ @@ -7,17 +9,17 @@ namespace Math { template T Min(T a, T b) { - return a < b ? a : b; + return (std::min)(a, b); } template T Max(T a, T b) { - return a > b ? a : b; + return (std::max)(a, b); } template T Clamp(T low, T x, T high) { - return Min(Max(low, x), high); + return (std::min)((std::max)(low, x), high); } } diff --git a/src/localisation/LanguagePack.cpp b/src/localisation/LanguagePack.cpp index 5e7d3dd64b..7a07260128 100644 --- a/src/localisation/LanguagePack.cpp +++ b/src/localisation/LanguagePack.cpp @@ -6,6 +6,7 @@ extern "C" { } #include "../core/FileStream.hpp" +#include "../core/Math.hpp" #include "../core/Memory.hpp" #include "../core/StringBuilder.hpp" #include "LanguagePack.h"