summaryrefslogtreecommitdiff
path: root/indra/llcommon/llunit.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llunit.h')
-rw-r--r--indra/llcommon/llunit.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h
index 1ef4924578..0081b51f84 100644
--- a/indra/llcommon/llunit.h
+++ b/indra/llcommon/llunit.h
@@ -593,9 +593,6 @@ struct LLUnitLinearOps
mDivisor(1)
{}
- T mValue;
- T mDivisor;
-
template<typename OTHER_T>
self_t operator * (OTHER_T other)
{
@@ -612,6 +609,7 @@ struct LLUnitLinearOps
template<typename OTHER_T>
self_t operator + (OTHER_T other)
{
+ mValue /= mDivisor;
mValue += other;
return *this;
}
@@ -619,9 +617,13 @@ struct LLUnitLinearOps
template<typename OTHER_T>
self_t operator - (OTHER_T other)
{
+ mValue /= mDivisor;
mValue -= other;
return *this;
}
+
+ T mValue;
+ T mDivisor;
};
template<typename T>
@@ -634,9 +636,6 @@ struct LLUnitInverseLinearOps
mDivisor(1)
{}
- T mValue;
- T mDivisor;
-
template<typename OTHER_T>
self_t operator * (OTHER_T other)
{
@@ -654,6 +653,7 @@ struct LLUnitInverseLinearOps
template<typename OTHER_T>
self_t operator + (OTHER_T other)
{
+ mValue /= mDivisor;
mValue -= other;
return *this;
}
@@ -661,9 +661,13 @@ struct LLUnitInverseLinearOps
template<typename OTHER_T>
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) \