summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-09-26 09:22:09 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-09-26 09:22:09 -0400
commit015ff3d6083a6ea6f7d9e30b22cfe080c81c04a5 (patch)
treef1e20433a242975278f903b70f7116df66a189e5 /indra/llmath
parent988a0fdd1eedab24677ed517942a4ef20c830f08 (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.cpp2
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"