From 8a6da4d6210192ada4a26ddd397c00d78b08dfcc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 26 Sep 2024 13:48:58 -0400 Subject: Rename our lerp() to flerp(); call where MSVC balks at std::lerp(). Now the lerp() in global namespace is std::lerp(), but it remains true that for some calls to std::lerp(), MSVC issues fatal argument conversion warnings. In those places, call flerp() (our historic lerp()) instead. --- indra/llmath/llmath.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llmath/llmath.h') diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 75284ef57e..1d6d986207 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -358,11 +358,11 @@ inline F32 snap_to_sig_figs(F32 foo, S32 sig_figs) return new_foo; } +using std::lerp; // Even though there's now a std::lerp() function that appears to do the same -// as this function, for some reason MSVC likes this one better. Publishing -// std::lerp() into the global namespace instead of defining this function -// results in fatal argument conversion warnings. -inline F32 lerp(F32 a, F32 b, F32 u) +// as this function, in some cases MSVC likes this one better: some calls to +// std::lerp() produce fatal argument conversion warnings. +inline F32 flerp(F32 a, F32 b, F32 u) { return a + ((b - a) * u); } -- cgit v1.2.3