summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltracerecording.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-07-09 00:42:36 +0300
committerGitHub <noreply@github.com>2024-07-09 00:42:36 +0300
commitf56ef28ccf168b5f9d42a9d405924ca604326ff7 (patch)
tree13b45d4c6f677c50721036c637b56f21e7cd2c64 /indra/llcommon/lltracerecording.cpp
parent94a66b558401c77953c990a992a91c7b32493f82 (diff)
parent9fdca96f8bd2211a99fe88e57b70cbecefa20b6d (diff)
Merge pull request #1944 from Ansariel/develop_c4244
Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now
Diffstat (limited to 'indra/llcommon/lltracerecording.cpp')
-rw-r--r--indra/llcommon/lltracerecording.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/llcommon/lltracerecording.cpp b/indra/llcommon/lltracerecording.cpp
index 1ec83be7cb..c23adca7e8 100644
--- a/indra/llcommon/lltracerecording.cpp
+++ b/indra/llcommon/lltracerecording.cpp
@@ -229,7 +229,7 @@ F32 Recording::getPerSec(const StatType<TimeBlockAccumulator::CallCountFacet>& s
update();
const TimeBlockAccumulator& accumulator = mBuffers->mStackTimers[stat.getIndex()];
const TimeBlockAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mStackTimers[stat.getIndex()] : NULL;
- return (F32)(accumulator.mCalls + (active_accumulator ? active_accumulator->mCalls : 0)) / mElapsedSeconds.value();
+ return (F32)(accumulator.mCalls + (active_accumulator ? active_accumulator->mCalls : 0)) / (F32)mElapsedSeconds.value();
}
bool Recording::hasValue(const StatType<CountAccumulator>& stat)
@@ -296,11 +296,11 @@ F64 Recording::getMean( const StatType<SampleAccumulator>& stat )
const SampleAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mSamples[stat.getIndex()] : NULL;
if (active_accumulator && active_accumulator->hasValue())
{
- F32 t = 0.0f;
+ F64 t = 0.0;
S32 div = accumulator.getSampleCount() + active_accumulator->getSampleCount();
if (div > 0)
{
- t = active_accumulator->getSampleCount() / div;
+ t = (F64)active_accumulator->getSampleCount() / (F64)div;
}
return lerp(accumulator.getMean(), active_accumulator->getMean(), t);
}
@@ -319,7 +319,7 @@ F64 Recording::getStandardDeviation( const StatType<SampleAccumulator>& stat )
if (active_accumulator && active_accumulator->hasValue())
{
F64 sum_of_squares = SampleAccumulator::mergeSumsOfSquares(accumulator, *active_accumulator);
- return sqrtf(sum_of_squares / (accumulator.getSamplingTime() + active_accumulator->getSamplingTime()));
+ return sqrt(sum_of_squares / (F64)(accumulator.getSamplingTime() + active_accumulator->getSamplingTime()));
}
else
{
@@ -382,11 +382,11 @@ F64 Recording::getMean( const StatType<EventAccumulator>& stat )
const EventAccumulator* active_accumulator = mActiveBuffers ? &mActiveBuffers->mEvents[stat.getIndex()] : NULL;
if (active_accumulator && active_accumulator->hasValue())
{
- F32 t = 0.0f;
+ F64 t = 0.0;
S32 div = accumulator.getSampleCount() + active_accumulator->getSampleCount();
if (div > 0)
{
- t = active_accumulator->getSampleCount() / div;
+ t = (F64)active_accumulator->getSampleCount() / (F64)div;
}
return lerp(accumulator.getMean(), active_accumulator->getMean(), t);
}
@@ -405,7 +405,7 @@ F64 Recording::getStandardDeviation( const StatType<EventAccumulator>& stat )
if (active_accumulator && active_accumulator->hasValue())
{
F64 sum_of_squares = EventAccumulator::mergeSumsOfSquares(accumulator, *active_accumulator);
- return sqrtf(sum_of_squares / (accumulator.getSampleCount() + active_accumulator->getSampleCount()));
+ return sqrt(sum_of_squares / (F64)(accumulator.getSampleCount() + active_accumulator->getSampleCount()));
}
else
{