summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltraceaccumulators.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/lltraceaccumulators.h')
-rw-r--r--indra/llcommon/lltraceaccumulators.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/llcommon/lltraceaccumulators.h b/indra/llcommon/lltraceaccumulators.h
index 42fad8a793..6f27b97dff 100644
--- a/indra/llcommon/lltraceaccumulators.h
+++ b/indra/llcommon/lltraceaccumulators.h
@@ -62,11 +62,11 @@ namespace LLTrace
{}
public:
-
- AccumulatorBuffer(const AccumulatorBuffer& other = *getDefaultBuffer())
- : mStorageSize(0),
+ AccumulatorBuffer()
+ : mStorageSize(0),
mStorage(NULL)
{
+ const AccumulatorBuffer& other = *getDefaultBuffer();
resize(sNextStorageSlot);
for (S32 i = 0; i < sNextStorageSlot; i++)
{
@@ -93,6 +93,18 @@ namespace LLTrace
return mStorage[index];
}
+
+ AccumulatorBuffer(const AccumulatorBuffer& other)
+ : mStorageSize(0),
+ mStorage(NULL)
+ {
+ resize(sNextStorageSlot);
+ for (S32 i = 0; i < sNextStorageSlot; i++)
+ {
+ mStorage[i] = other.mStorage[i];
+ }
+ }
+
void addSamples(const AccumulatorBuffer<ACCUMULATOR>& other, EBufferAppendType append_type)
{
llassert(mStorageSize >= sNextStorageSlot && other.mStorageSize >= sNextStorageSlot);