diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llunit.h | 10 | ||||
-rwxr-xr-x | indra/newview/llviewerstats.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 10 |
3 files changed, 8 insertions, 14 deletions
diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index c43ca2ba18..f43df3753a 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -76,8 +76,8 @@ struct LLUnit typedef STORAGE_TYPE storage_t; // default initialization - LLUnit() - : mValue(storage_t()) + LLUnit(storage_t value = storage_t()) + : mValue(value) {} // unit initialization and conversion @@ -85,12 +85,6 @@ struct LLUnit LLUnit(LLUnit<OTHER_UNIT, OTHER_STORAGE> other) : mValue(convert(other)) {} - - // value initialization - template<typename CONVERTABLE_TYPE> - LLUnit(CONVERTABLE_TYPE value) - : mValue(value) - {} // value assignment self_t& operator = (storage_t value) diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 077c9f43a4..136a4d0a9e 100755 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -394,7 +394,7 @@ void update_statistics() static LLFrameTimer texture_stats_timer; if (texture_stats_timer.getElapsedTimeF32() >= texture_stats_freq) { - gTotalTextureData = LLTrace::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT)).value(); + gTotalTextureData = LLTrace::Bytes(LLViewerStats::instance().getRecording().getSum(LLStatViewer::TEXTURE_KBIT)); texture_stats_timer.reset(); } } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 76210563bb..2680a1cdeb 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -533,7 +533,7 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sTotalTextureMemory >= sMaxTotalTextureMem) { //when texture memory overflows, lower down the threshold to release the textures more aggressively. - sMaxDesiredTextureMem = llmin(sMaxDesiredTextureMem * 0.75f, LLUnit<LLUnits::Bytes, S32>(gMaxVideoRam)); + sMaxDesiredTextureMem = (S32)llmin(sMaxDesiredTextureMem * 0.75f, LLUnit<LLUnits::Bytes, S32>(gMaxVideoRam)); // If we are using more texture memory than we should, // scale up the desired discard level @@ -549,8 +549,8 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sEvaluationTimer.reset(); } else if (sDesiredDiscardBias > 0.0f && - sBoundTextureMemory < sMaxBoundTextureMem * texmem_lower_bound_scale && - sTotalTextureMemory < sMaxTotalTextureMem * texmem_lower_bound_scale) + sBoundTextureMemory < (S32)(sMaxBoundTextureMem * texmem_lower_bound_scale) && + sTotalTextureMemory < (S32)(sMaxTotalTextureMem * texmem_lower_bound_scale)) { // If we are using less texture memory than we should, // scale down the desired discard level @@ -568,8 +568,8 @@ void LLViewerTexture::updateClass(const F32 velocity, const F32 angular_velocity sCameraMovingBias = llmax(0.2f * camera_moving_speed, 2.0f * camera_angular_speed - 1); sCameraMovingDiscardBias = (S8)(sCameraMovingBias); - LLViewerTexture::sFreezeImageScalingDown = (sBoundTextureMemory < 0.75f * sMaxBoundTextureMem * texmem_middle_bound_scale) && - (sTotalTextureMemory < 0.75f * sMaxTotalTextureMem * texmem_middle_bound_scale) ; + LLViewerTexture::sFreezeImageScalingDown = (sBoundTextureMemory < (S32)(0.75f * sMaxBoundTextureMem * texmem_middle_bound_scale)) && + (sTotalTextureMemory < (S32)(0.75f * sMaxTotalTextureMem * texmem_middle_bound_scale)); } //end of static functions |