diff --git a/indra/llmath/v3dmath.h b/indra/llmath/v3dmath.h index 5efc1bff6a1cb64b5dcd4589f3bf20f24753ec29..40297dbcfd6a3358a4c92849759ddb9d02bd7d7e 100644 --- a/indra/llmath/v3dmath.h +++ b/indra/llmath/v3dmath.h @@ -404,11 +404,7 @@ inline bool operator!=(const LLVector3d& a, const LLVector3d& b) // [RLVa:KB] - RlvBehaviourModifierCompMin/Max inline bool operator<(const LLVector3d& lhs, const LLVector3d& rhs) { - return (lhs.mdV[0] < rhs.mdV[0] - || (lhs.mdV[0] == rhs.mdV[0] - && (lhs.mdV[1] < rhs.mdV[1] - || ((lhs.mdV[1] == rhs.mdV[1]) - && lhs.mdV[2] < rhs.mdV[2])))); + return std::tie(lhs.mdV[0], lhs.mdV[1], lhs.mdV[2]) < std::tie(rhs.mdV[0], rhs.mdV[1], rhs.mdV[2]); } // [/RLVa:KB] diff --git a/indra/llmath/v4math.h b/indra/llmath/v4math.h index c9bf7230672d1e1091d46a6a76d125e2545c06e0..3f98600b407c8602ff619d85a03b12d59a346579 100644 --- a/indra/llmath/v4math.h +++ b/indra/llmath/v4math.h @@ -479,13 +479,7 @@ inline LLVector4 operator-(const LLVector4 &a) // [RLVa:KB] - RlvBehaviourModifierCompMin/Max inline bool operator<(const LLVector4& lhs, const LLVector4& rhs) { - return (lhs.mV[0] < rhs.mV[0] - || (lhs.mV[0] == rhs.mV[0] - && (lhs.mV[1] < rhs.mV[1] - || ((lhs.mV[1] == rhs.mV[1]) - && lhs.mV[2] < rhs.mV[2] - || ((lhs.mV[2] == rhs.mV[2]) - && lhs.mV[3] < rhs.mV[3]))))); + return std::tie(lhs.mV[0], lhs.mV[1], lhs.mV[2], lhs.mV[3]) < std::tie(rhs.mV[0], rhs.mV[1], rhs.mV[2], rhs.mV[3]); } // [/RLVa:KB] diff --git a/indra/newview/llvisualeffect.h b/indra/newview/llvisualeffect.h index 6419e26b297016a159207b1e83f39c3acd4fe486..8477f6d5d0c2671aa5be798a09534b014f36a76f 100644 --- a/indra/newview/llvisualeffect.h +++ b/indra/newview/llvisualeffect.h @@ -49,7 +49,7 @@ struct LLVisualEffectParams virtual void step(bool isLast) = 0; }; -struct LLShaderEffectParams : LLVisualEffectParams +struct LLShaderEffectParams final : LLVisualEffectParams { explicit LLShaderEffectParams(LLRenderTarget* pSrcBuffer, LLRenderTarget* pScratchBuffer, bool fBindLast) : m_pSrcBuffer(pScratchBuffer), m_pDstBuffer(pSrcBuffer), m_fBindLast(fBindLast) {} @@ -103,7 +103,7 @@ class LLTweenableValue { public: LLTweenableValue(const T& defaultValue) : m_CurValue(defaultValue) {} - virtual ~LLTweenableValue() {} + virtual ~LLTweenableValue() = default; virtual T get() = 0; virtual void start(const T& endValue, double duration) = 0; @@ -118,7 +118,7 @@ class LLTweenableValue }; template<typename T> -class LLTweenableValueLerp : public LLTweenableValue<T> +class LLTweenableValueLerp final : public LLTweenableValue<T> { public: LLTweenableValueLerp(const T& defaultValue) : LLTweenableValue<T>(defaultValue) {} @@ -148,11 +148,11 @@ class LLTweenableValueLerp : public LLTweenableValue<T> // // -class LLVfxManager : public LLSingleton<LLVfxManager> +class LLVfxManager final : public LLSingleton<LLVfxManager> { LLSINGLETON(LLVfxManager); protected: - ~LLVfxManager() {} + ~LLVfxManager() = default; /* * Member functions diff --git a/indra/newview/rlveffects.h b/indra/newview/rlveffects.h index 0b55b2a500cca81de33fa3ede7aeb28176105322..5bcf67aea58ac6f346bdf9d6bef9072ae8dedb08 100644 --- a/indra/newview/rlveffects.h +++ b/indra/newview/rlveffects.h @@ -29,7 +29,7 @@ class LLViewerFetchedTexture; // RlvOverlayEffect class // -class RlvOverlayEffect : public LLVisualEffect +class RlvOverlayEffect final : public LLVisualEffect { public: RlvOverlayEffect(const LLUUID& idRlvObj); @@ -64,7 +64,7 @@ class RlvOverlayEffect : public LLVisualEffect // RlvSphereEffect class // -class RlvSphereEffect : public LLVisualEffect +class RlvSphereEffect final : public LLVisualEffect { public: RlvSphereEffect(const LLUUID& idRlvObj);