summaryrefslogtreecommitdiff
path: root/indra/llcommon/llunit.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-10-09 18:02:47 -0700
committerRichard Linden <none@none>2012-10-09 18:02:47 -0700
commitaff9654c1115b4a74fc3ee8f9ca2c2ffa07f8d73 (patch)
tree4cbd07cad7b3d912324aee7513fb5462bab9d13b /indra/llcommon/llunit.h
parent3960fdf9e01619ddfd7903bcdd8d894f432752d0 (diff)
SH-3275 WIP Update viewer metrics system to be more flexible
added PeriodicRecorder class for frame by frame stats accumulation
Diffstat (limited to 'indra/llcommon/llunit.h')
-rw-r--r--indra/llcommon/llunit.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h
index 9d78df7cae..52b837fdc3 100644
--- a/indra/llcommon/llunit.h
+++ b/indra/llcommon/llunit.h
@@ -44,13 +44,19 @@ struct LLUnit : public BASE_UNIT
: BASE_UNIT(convertToBase(value))
{}
- operator value_t() { return get(); }
+ operator value_t() { return value(); }
- value_t get() const
+ value_t value() const
{
return convertToDerived(mValue);
}
+ template<typename CONVERTED_TYPE>
+ value_t value() const
+ {
+ return CONVERTED_TYPE(*this).value();
+ }
+
static value_t convertToBase(value_t derived_value)
{
return (value_t)((F32)derived_value * DERIVED_UNIT::conversionToBaseFactor());
@@ -84,7 +90,7 @@ struct LLUnit<T, T>
return *this;
}
- value_t get() { return mValue; }
+ value_t value() { return mValue; }
static value_t convertToBase(value_t derived_value)
{