From 410f9d92a5a83719f24130d55c086b2517833998 Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Tue, 7 May 2013 02:01:31 +0200 Subject: [PATCH] Minor improvemnt of coding style. --- indra/llmessage/aiaverage.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/llmessage/aiaverage.h b/indra/llmessage/aiaverage.h index f8f344df6..ee588bd9f 100644 --- a/indra/llmessage/aiaverage.h +++ b/indra/llmessage/aiaverage.h @@ -52,7 +52,8 @@ class AIAverage { U32 mN; // The number of calls to operator(). int const mNrOfBuckets; // Size of mData. std::vector mData; // The buckets. - LLMutex mLock; // Mutex for all of the above data. + + mutable LLMutex mLock; // Mutex for all of the above data. public: AIAverage(int number_of_buckets) : mCurrentClock(~(U64)0), mTail(0), mCurrentBucket(0), mSum(0), mN(0), mNrOfBuckets(number_of_buckets), mData(number_of_buckets) @@ -88,7 +89,7 @@ class AIAverage { mLock.unlock(); return sum; } - double getAverage(double avg_no_data) + double getAverage(double avg_no_data) const { mLock.lock(); double avg = mSum;