diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llcommon/llfasttimer.cpp | 2 | ||||
-rw-r--r-- | indra/llcommon/llunit.h | 15 | ||||
-rwxr-xr-x | indra/llprimitive/llprimitive.h | 2 | ||||
-rwxr-xr-x | indra/newview/llfasttimerview.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llscenemonitor.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/lltextureinfo.cpp | 4 | ||||
-rwxr-xr-x | indra/newview/llviewerstats.cpp | 2 | ||||
-rwxr-xr-x | indra/test/lltemplatemessagebuilder_tut.cpp | 7 | ||||
-rwxr-xr-x | indra/test/message_tut.cpp | 7 |
9 files changed, 26 insertions, 17 deletions
diff --git a/indra/llcommon/llfasttimer.cpp b/indra/llcommon/llfasttimer.cpp index 6f046c18ff..f4c87ab6f6 100755 --- a/indra/llcommon/llfasttimer.cpp +++ b/indra/llcommon/llfasttimer.cpp @@ -397,7 +397,7 @@ void TimeBlock::dumpCurTimes() } out_str << timerp->getName() << " " - << std::setprecision(3) << total_time.valueAs<LLUnits::Milliseconds>() << " ms, " + << std::setprecision(3) << total_time.valueInUnits<LLUnits::Milliseconds>() << " ms, " << num_calls << " calls"; llinfos << out_str.str() << llendl; diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 781a4ab731..2e4c0de28f 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -74,10 +74,21 @@ struct LLUnit return mValue; } + void value(storage_t value) + { + mValue = value; + } + + template<typename NEW_UNIT_TYPE> + storage_t valueInUnits() + { + return LLUnit<storage_t, NEW_UNIT_TYPE>(*this).value(); + } + template<typename NEW_UNIT_TYPE> - STORAGE_TYPE valueAs() + void valueInUnits(storage_t value) { - return LLUnit<STORAGE_TYPE, NEW_UNIT_TYPE>(*this).value(); + *this = LLUnit<storage_t, NEW_UNIT_TYPE>(value); } void operator += (storage_t value) diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h index 9edbbff34c..cdb3f273c2 100755 --- a/indra/llprimitive/llprimitive.h +++ b/indra/llprimitive/llprimitive.h @@ -649,7 +649,7 @@ void LLPrimitive::addVelocity(const LLVector3& vel) } else { - LL_ERRS() << Non Finite in LLPrimitive::addVelocity" << LL_ENDL; + LL_ERRS() << "Non Finite in LLPrimitive::addVelocity" << LL_ENDL; } } diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index b61889ccfa..4037b5ebdd 100755 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -1427,7 +1427,7 @@ void LLFastTimerView::updateTotalTime() break; } - mTotalTimeDisplay = LLUnits::Milliseconds::fromValue(llceil(mTotalTimeDisplay.valueAs<LLUnits::Milliseconds>() / 20.f) * 20.f); + mTotalTimeDisplay = LLUnits::Milliseconds::fromValue(llceil(mTotalTimeDisplay.valueInUnits<LLUnits::Milliseconds>() / 20.f) * 20.f); } void LLFastTimerView::drawBars() diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 918b2271d1..f0c7a220a4 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -649,7 +649,7 @@ void LLSceneMonitor::dumpToFile(std::string file_name) for (S32 frame = 1; frame <= frame_count; frame++) { - os << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMax(*it).valueAs<LLUnits::Kibibytes>(); + os << ", " << scene_load_recording.getPrevRecording(frame_count - frame).getMax(*it).valueInUnits<LLUnits::Kibibytes>(); } os << '\n'; diff --git a/indra/newview/lltextureinfo.cpp b/indra/newview/lltextureinfo.cpp index 3ae85d56da..d467fd4d97 100755 --- a/indra/newview/lltextureinfo.cpp +++ b/indra/newview/lltextureinfo.cpp @@ -200,11 +200,11 @@ LLSD LLTextureInfo::getAverages() } else { - averageDownloadRate = mRecording.getSum(sTextureDataDownloaded).valueAs<LLUnits::Bits>() / download_time.valueAs<LLUnits::Seconds>(); + averageDownloadRate = mRecording.getSum(sTextureDataDownloaded).valueInUnits<LLUnits::Bits>() / download_time.valueInUnits<LLUnits::Seconds>(); } averagedTextureData["bits_per_second"] = averageDownloadRate; - averagedTextureData["bytes_downloaded"] = mRecording.getSum(sTextureDataDownloaded).valueAs<LLUnits::Bytes>(); + averagedTextureData["bytes_downloaded"] = mRecording.getSum(sTextureDataDownloaded).valueInUnits<LLUnits::Bytes>(); averagedTextureData["texture_downloads_started"] = mRecording.getSum(sTextureDownloadsStarted); averagedTextureData["texture_downloads_completed"] = mRecording.getSum(sTextureDownloadsCompleted); averagedTextureData["transport"] = mTextureDownloadProtocol; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 94be8e2a83..69198ed53d 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -593,7 +593,7 @@ void send_stats() S32 window_height = gViewerWindow->getWindowHeightRaw(); S32 window_size = (window_width * window_height) / 1024; misc["string_1"] = llformat("%d", window_size); - misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds); + misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds.value()); // misc["int_1"] = LLSD::Integer(gSavedSettings.getU32("RenderQualityPerformance")); // Steve: 1.21 // misc["int_2"] = LLSD::Integer(gFrameStalls); // Steve: 1.21 diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index 6c0b70edd2..381826658b 100755 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -35,7 +35,6 @@ #include "llquaternion.h" #include "lltemplatemessagebuilder.h" #include "lltemplatemessagereader.h" -#include "llversionserver.h" #include "message_prehash.h" #include "u64.h" #include "v3dmath.h" @@ -59,9 +58,9 @@ namespace tut const F32 circuit_timeout=100; start_messaging_system("notafile", 13035, - LL_VERSION_MAJOR, - LL_VERSION_MINOR, - LL_VERSION_PATCH, + 1, + 0, + 0, FALSE, "notasharedsecret", NULL, diff --git a/indra/test/message_tut.cpp b/indra/test/message_tut.cpp index d971b33475..4c0463c65c 100755 --- a/indra/test/message_tut.cpp +++ b/indra/test/message_tut.cpp @@ -32,7 +32,6 @@ #include "llapr.h" #include "llmessageconfig.h" #include "llsdserialize.h" -#include "llversionserver.h" #include "message.h" #include "message_prehash.h" @@ -72,9 +71,9 @@ namespace tut // currently test disconnected message system start_messaging_system("notafile", 13035, - LL_VERSION_MAJOR, - LL_VERSION_MINOR, - LL_VERSION_PATCH, + 1, + 0, + 0, FALSE, "notasharedsecret", NULL, |