From 4c6afbbb75076e9fd34ee5707a02195c4e2f7223 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 17 Apr 2025 19:50:30 +0200 Subject: Restore llmath improvements from archived develop branch: * Make eligible functions constexpr * Use constants for vector indices where applicable * Reformat to match actual coding conventions --- indra/llcommon/stdtypes.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llcommon/stdtypes.h') diff --git a/indra/llcommon/stdtypes.h b/indra/llcommon/stdtypes.h index 28e50b3d21..f1e4c2bc78 100644 --- a/indra/llcommon/stdtypes.h +++ b/indra/llcommon/stdtypes.h @@ -164,14 +164,14 @@ private: FROM mValue; public: - narrow(FROM value): mValue(value) {} + constexpr narrow(FROM value): mValue(value) {} /*---------------------- Narrowing unsigned to signed ----------------------*/ template ::value && std::is_signed::value, bool>::type = true> - inline + constexpr operator TO() const { // The reason we skip the @@ -189,7 +189,7 @@ public: typename std::enable_if::value && std::is_signed::value), bool>::type = true> - inline + constexpr operator TO() const { // two different assert()s so we can tell which condition failed -- cgit v1.2.3