From b667d20e00e4ea5f1d5a619d2868b502583deb43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 23 Aug 2013 15:34:41 -0700 Subject: fixed issue with poor framerate after clearing cache --- indra/llcommon/llunit.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index bfc011bb55..de9cee33fd 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -601,9 +601,6 @@ struct LLUnitLinearOps mDivisor(1) {} - T mValue; - T mDivisor; - template self_t operator * (OTHER_T other) { @@ -620,6 +617,7 @@ struct LLUnitLinearOps template self_t operator + (OTHER_T other) { + mValue /= mDivisor; mValue += other; return *this; } @@ -627,9 +625,13 @@ struct LLUnitLinearOps template self_t operator - (OTHER_T other) { + mValue /= mDivisor; mValue -= other; return *this; } + + T mValue; + T mDivisor; }; template @@ -642,9 +644,6 @@ struct LLUnitInverseLinearOps mDivisor(1) {} - T mValue; - T mDivisor; - template self_t operator * (OTHER_T other) { @@ -662,6 +661,7 @@ struct LLUnitInverseLinearOps template self_t operator + (OTHER_T other) { + mValue /= mDivisor; mValue -= other; return *this; } @@ -669,9 +669,13 @@ struct LLUnitInverseLinearOps template self_t operator - (OTHER_T other) { + mValue /= mDivisor; mValue += other; return *this; } + + T mValue; + T mDivisor; }; #define LL_DECLARE_BASE_UNIT(base_unit_name, unit_label) \ -- cgit v1.2.3