diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-26 09:22:09 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-26 09:22:09 -0400 |
commit | 015ff3d6083a6ea6f7d9e30b22cfe080c81c04a5 (patch) | |
tree | f1e20433a242975278f903b70f7116df66a189e5 /indra/llmath | |
parent | 988a0fdd1eedab24677ed517942a4ef20c830f08 (diff) |
#include <cmath> rather than "math.h" to avoid lerp() conflict.
GCC on Linux complains that "math.h", which hoists all the standard library
math functions into the global namespace for classic C compatibility, creates
a conflict between `std::lerp()` and the `lerp()` function in llmath.h.
(Perhaps we should just replace our `lerp()` definition with `using std::lerp;`)
Anyway, bringing in <cmath> rather than "math.h" leaves standard library math
functions in the `std` namespace, avoiding the conflict.
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/raytrace.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/llmath/raytrace.cpp b/indra/llmath/raytrace.cpp index 893bf1fc70..1251ab9f8d 100644 --- a/indra/llmath/raytrace.cpp +++ b/indra/llmath/raytrace.cpp @@ -26,7 +26,7 @@ #include "linden_common.h" -#include "math.h" +#include <cmath> //#include "vmath.h" #include "v3math.h" #include "llquaternion.h" |