summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llhudtext.cpp3
-rw-r--r--indra/newview/llmeshrepository.cpp3
-rw-r--r--indra/newview/lloutfitgallery.cpp3
-rw-r--r--indra/newview/llphysicsmotion.cpp33
-rw-r--r--indra/newview/lltoolpie.cpp3
5 files changed, 25 insertions, 20 deletions
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 5ee0ab437d..78afe43ffe 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -392,7 +392,8 @@ void LLHUDText::updateVisibility()
LLVector3 pos_agent_center = gAgent.getPosAgentFromGlobal(mPositionGlobal) - dir_from_camera;
F32 last_distance_center = (pos_agent_center - LLViewerCamera::getInstance()->getOrigin()).magVec();
- F32 max_draw_distance = gSavedSettings.getF32("PrimTextMaxDrawDistance");
+ static LLCachedControl<bool> prim_text_max_dist(gSavedSettings, "PrimTextMaxDrawDistance");
+ F32 max_draw_distance = prim_text_max_dist;
if(max_draw_distance < 0)
{
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index c02a12e6b2..1c64ed6822 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -3743,7 +3743,8 @@ void LLMeshRepository::notifyLoadedMeshes()
? (2 * LLAppCoreHttp::PIPELINING_DEPTH)
: 5);
- LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("Mesh2MaxConcurrentRequests");
+ static LLCachedControl<U32> mesh2_max_req(gSavedSettings, "Mesh2MaxConcurrentRequests");
+ LLMeshRepoThread::sMaxConcurrentRequests = mesh2_max_req;
LLMeshRepoThread::sRequestHighWater = llclamp(scale * S32(LLMeshRepoThread::sMaxConcurrentRequests),
REQUEST2_HIGH_WATER_MIN,
REQUEST2_HIGH_WATER_MAX);
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 96be917019..b1b9f69f4f 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -416,7 +416,8 @@ void LLOutfitGallery::updateRowsIfNeeded()
bool compareGalleryItem(LLOutfitGalleryItem* item1, LLOutfitGalleryItem* item2)
{
- if(gSavedSettings.getBOOL("OutfitGallerySortByName") ||
+ static LLCachedControl<bool> outfit_gallery_sort_by_name(gSavedSettings, "OutfitGallerySortByName");
+ if(outfit_gallery_sort_by_name ||
((item1->isDefaultImage() && item2->isDefaultImage()) || (!item1->isDefaultImage() && !item2->isDefaultImage())))
{
std::string name1 = item1->getItemName();
diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp
index 6782aa2123..86291708b0 100644
--- a/indra/newview/llphysicsmotion.cpp
+++ b/indra/newview/llphysicsmotion.cpp
@@ -454,25 +454,26 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const
bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- // Skip if disabled globally.
- if (!gSavedSettings.getBOOL("AvatarPhysics"))
- {
- return true;
- }
+ // Skip if disabled globally.
+ static LLCachedControl<bool> av_physics(gSavedSettings, "AvatarPhysics");
+ if (!av_physics)
+ {
+ return true;
+ }
- bool update_visuals = false;
- for (motion_vec_t::iterator iter = mMotions.begin();
- iter != mMotions.end();
- ++iter)
- {
- LLPhysicsMotion *motion = (*iter);
- update_visuals |= motion->onUpdate(time);
- }
+ bool update_visuals = false;
+ for (motion_vec_t::iterator iter = mMotions.begin();
+ iter != mMotions.end();
+ ++iter)
+ {
+ LLPhysicsMotion *motion = (*iter);
+ update_visuals |= motion->onUpdate(time);
+ }
- if (update_visuals)
- mCharacter->updateVisualParams();
+ if (update_visuals)
+ mCharacter->updateVisualParams();
- return true;
+ return true;
}
// Return true if character has to update visual params.
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 531e657a1e..8cdc2e94f4 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -1424,7 +1424,8 @@ void LLToolPie::handleDeselect()
LLTool* LLToolPie::getOverrideTool(MASK mask)
{
- if (gSavedSettings.getBOOL("EnableGrab"))
+ static LLCachedControl<bool> enable_grab(gSavedSettings, "EnableGrab");
+ if (enable_grab)
{
if (mask == DEFAULT_GRAB_MASK)
{