From 0007114cf5a60779319ab8cbd0a23a0d462b8010 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 5 Nov 2012 16:10:57 -0800 Subject: SH-3499 WIP Ensure asset stats output is correct fixed copy behavior of recordings and accumulator buffers --- indra/llcommon/lltrace.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'indra/llcommon/lltrace.h') diff --git a/indra/llcommon/lltrace.h b/indra/llcommon/lltrace.h index 735c45754c..8ad391e6e5 100644 --- a/indra/llcommon/lltrace.h +++ b/indra/llcommon/lltrace.h @@ -38,9 +38,9 @@ #include -#define TOKEN_PASTE_ACTUAL(x, y) x##y -#define TOKEN_PASTE(x, y) TOKEN_PASTE_ACTUAL(x, y) -#define RECORD_BLOCK_TIME(block_timer) LLTrace::BlockTimer::Recorder TOKEN_PASTE(block_time_recorder, __COUNTER__)(block_timer); +#define LL_TOKEN_PASTE_ACTUAL(x, y) x##y +#define LL_TOKEN_PASTE(x, y) LL_TOKEN_PASTE_ACTUAL(x, y) +#define LL_RECORD_BLOCK_TIME(block_timer) LLTrace::BlockTimer::Recorder LL_TOKEN_PASTE(block_time_recorder, __COUNTER__)(block_timer); namespace LLTrace { @@ -93,13 +93,16 @@ namespace LLTrace public: - // copying an accumulator buffer does not copy the actual contents, but simply initializes the buffer size - // to be identical to the other buffer AccumulatorBuffer(const AccumulatorBuffer& other = getDefaultBuffer()) : mStorageSize(other.mStorageSize), mStorage(new ACCUMULATOR[other.mStorageSize]), mNextStorageSlot(other.mNextStorageSlot) - {} + { + for (S32 i = 0; i < mNextStorageSlot; i++) + { + mStorage[i] = other.mStorage[i]; + } + } ~AccumulatorBuffer() { -- cgit v1.2.3