summaryrefslogtreecommitdiff
path: root/indra/llcommon/stdtypes.h
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2025-04-17 19:50:30 +0200
committerAnsariel <ansariel.hiller@phoenixviewer.com>2025-04-17 19:50:30 +0200
commit4c6afbbb75076e9fd34ee5707a02195c4e2f7223 (patch)
treeb2aadd1082e28b92892755f6b2dfb64edc098ad4 /indra/llcommon/stdtypes.h
parent441c844ec8319f4c15d59de5a5a8ae46be7912f1 (diff)
Restore llmath improvements from archived develop branch:
* Make eligible functions constexpr * Use constants for vector indices where applicable * Reformat to match actual coding conventions
Diffstat (limited to 'indra/llcommon/stdtypes.h')
-rw-r--r--indra/llcommon/stdtypes.h6
1 files changed, 3 insertions, 3 deletions
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 <typename TO,
typename std::enable_if<std::is_unsigned<FROM>::value &&
std::is_signed<TO>::value,
bool>::type = true>
- inline
+ constexpr
operator TO() const
{
// The reason we skip the
@@ -189,7 +189,7 @@ public:
typename std::enable_if<! (std::is_unsigned<FROM>::value &&
std::is_signed<TO>::value),
bool>::type = true>
- inline
+ constexpr
operator TO() const
{
// two different assert()s so we can tell which condition failed