summaryrefslogtreecommitdiff
path: root/indra/newview/llsimplestat.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-06-05 19:05:43 -0700
committerRichard Linden <none@none>2013-06-05 19:05:43 -0700
commit0a96b47663c99914c587cdcb8bcdc096bbf55fa3 (patch)
tree67bca4958927ed7f6df423de05e42cd271292391 /indra/newview/llsimplestat.h
parentdcfb18373eca7986a73d8b9a1d34970cc0a23ed9 (diff)
parenta74b5dfa923f8eeccc9b786143f0f832de3ad450 (diff)
merge with viewer-release
Diffstat (limited to 'indra/newview/llsimplestat.h')
-rwxr-xr-xindra/newview/llsimplestat.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/indra/newview/llsimplestat.h b/indra/newview/llsimplestat.h
index 9d7780c4f9..80ce99b774 100755
--- a/indra/newview/llsimplestat.h
+++ b/indra/newview/llsimplestat.h
@@ -99,43 +99,43 @@ public:
* values back to zero.
*/
void reset()
- {
- mCount = 0;
- mMin = Value(0);
- mMax = Value(0);
- mTotal = Value(0);
- }
+ {
+ mCount = 0;
+ mMin = Value(0);
+ mMax = Value(0);
+ mTotal = Value(0);
+ }
void record(Value v)
+ {
+ if (mCount)
+ {
+ mMin = llmin(mMin, v);
+ mMax = llmax(mMax, v);
+ }
+ else
{
- if (mCount)
- {
- mMin = llmin(mMin, v);
- mMax = llmax(mMax, v);
- }
- else
- {
- mMin = v;
- mMax = v;
- }
- mTotal += v;
- ++mCount;
+ mMin = v;
+ mMax = v;
}
+ mTotal += v;
+ ++mCount;
+ }
void merge(const LLSimpleStatMMM<VALUE_T> & src)
+ {
+ if (! mCount)
+ {
+ *this = src;
+ }
+ else if (src.mCount)
{
- if (! mCount)
- {
- *this = src;
- }
- else if (src.mCount)
- {
- mMin = llmin(mMin, src.mMin);
- mMax = llmax(mMax, src.mMax);
- mCount += src.mCount;
- mTotal += src.mTotal;
- }
+ mMin = llmin(mMin, src.mMin);
+ mMax = llmax(mMax, src.mMax);
+ mCount += src.mCount;
+ mTotal += src.mTotal;
}
+ }
inline U32 getCount() const { return mCount; }
inline Value getMin() const { return mMin; }