diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-26 12:35:27 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-26 12:35:27 -0400 |
commit | d7f6b96e36c3cadb7a2731c6417709ee9668f2d7 (patch) | |
tree | a11049d64197bd45b75010534132c7c9f917dfa6 /indra/llmath/llinterp.h | |
parent | 6ac59d1d5e200cccd3ddaa6d1c3b0d8d116a06be (diff) |
Reinstate our lerp() function, avoid "math.h" header.
For reasons that remain unclear, MSVC likes our lerp() function better than
its own std::lerp() function: publishing the latter into the global namespace,
instead of defining our own, produces fatal argument conversion warnings.
"math.h" publishes all of <cmath> into the global namespace, which causes a
GCC conflict between std::lerp() and our lerp() function. Including <cmath>
instead leaves std::lerp() in the std namespace, eliminating the conflict.
Diffstat (limited to 'indra/llmath/llinterp.h')
-rw-r--r-- | indra/llmath/llinterp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llmath/llinterp.h b/indra/llmath/llinterp.h index f4faa82a82..386679ffe9 100644 --- a/indra/llmath/llinterp.h +++ b/indra/llmath/llinterp.h @@ -29,11 +29,11 @@ #if defined(LL_WINDOWS) // macro definitions for common math constants (e.g. M_PI) are declared under the _USE_MATH_DEFINES // on Windows system. -// So, let's define _USE_MATH_DEFINES before including math.h +// So, let's define _USE_MATH_DEFINES before including cmath #define _USE_MATH_DEFINES #endif -#include "math.h" +#include <cmath> // Class from which different types of interpolators can be derived |