summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappearancemgr.h3
-rw-r--r--indra/newview/llappviewer.cpp7
-rw-r--r--indra/newview/llfasttimerview.cpp14
-rw-r--r--indra/newview/llfavoritesbar.cpp7
-rw-r--r--indra/newview/llfloater360capture.cpp6
-rw-r--r--indra/newview/llfloaterregioninfo.cpp12
-rw-r--r--indra/newview/llgesturemgr.cpp4
-rw-r--r--indra/newview/llinventorymodel.cpp9
-rw-r--r--indra/newview/lllegacyatmospherics.cpp19
-rw-r--r--indra/newview/llmeshrepository.cpp10
-rw-r--r--indra/newview/llmodelpreview.cpp4
-rw-r--r--indra/newview/llpatchvertexarray.cpp2
-rw-r--r--indra/newview/llpresetsmanager.cpp2
-rw-r--r--indra/newview/llsceneview.cpp12
-rw-r--r--indra/newview/llskinningutil.cpp3
-rw-r--r--indra/newview/lltoast.h3
-rw-r--r--indra/newview/llviewertexturelist.cpp5
-rw-r--r--indra/newview/llvopartgroup.cpp7
-rw-r--r--indra/newview/llwatchdog.cpp13
-rw-r--r--indra/newview/llworld.cpp8
-rwxr-xr-xindra/newview/viewer_manifest.py2
21 files changed, 38 insertions, 114 deletions
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 8a55a848db..cf953d21ac 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -35,6 +35,7 @@
#include "llinventoryobserver.h"
#include "llviewerinventory.h"
#include "llcorehttputil.h"
+#include <memory>
class LLWearableHoldingPattern;
class LLInventoryCallback;
@@ -276,7 +277,7 @@ private:
LLUUID mCOFImageID;
- std::auto_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer;
+ std::unique_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer;
// Set of temp attachment UUIDs that should be removed
typedef std::set<LLUUID> doomed_temp_attachments_t;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index d61a66c696..33e93da0ef 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1185,12 +1185,8 @@ bool LLAppViewer::init()
{
LL_WARNS("InitInfo") << "Skipping updater check." << LL_ENDL;
}
+#endif //LL_RELEASE_FOR_DOWNLOAD
- if (mUpdaterNotFound)
- {
- LL_WARNS("InitInfo") << "Failed to launch updater. Skipping Leap commands." << LL_ENDL;
- }
- else
{
// Iterate over --leap command-line options. But this is a bit tricky: if
// there's only one, it won't be an array at all.
@@ -1223,7 +1219,6 @@ bool LLAppViewer::init()
<< "lleventhost no longer supported as a dynamic library"
<< LL_ENDL;
}
-#endif //LL_RELEASE_FOR_DOWNLOAD
LLTextUtil::TextHelpers::iconCallbackCreationFunction = create_text_segment_icon_from_url_match;
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index 1605e4133d..9bb3bac104 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -504,20 +504,6 @@ void LLFastTimerView::exportCharts(const std::string& base, const std::string& t
is.close();
}
- //get time domain
- LLSD::Real cur_total_time = 0.0;
-
- for (U32 i = 0; i < cur_data.size(); ++i)
- {
- cur_total_time += cur_data[i]["Total"]["Time"].asReal();
- }
-
- LLSD::Real base_total_time = 0.0;
- for (U32 i = 0; i < base_data.size(); ++i)
- {
- base_total_time += base_data[i]["Total"]["Time"].asReal();
- }
-
//allocate raw scratch space
LLPointer<LLImageRaw> scratch = new LLImageRaw(1024, 512, 3);
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index a02bb56489..4f2769a507 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -848,8 +848,11 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update)
if (getChildList()->size() > 0)
{
//find last visible child to get the rightest button offset
- child_list_const_reverse_iter_t last_visible_it = std::find_if(childs->rbegin(), childs->rend(),
- std::mem_fun(&LLView::getVisible));
+ child_list_const_reverse_iter_t last_visible_it =
+ std::find_if(
+ childs->rbegin(), childs->rend(),
+ [](const child_list_t::value_type& child)
+ { return child->getVisible(); });
if(last_visible_it != childs->rend())
{
last_right_edge = (*last_visible_it)->getRect().mRight;
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index c075f7e8bd..16f251c9b3 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -892,8 +892,10 @@ const std::string LLFloater360Capture::generate_proposed_filename()
// this looks complex but it's straightforward - removes all non-alpha chars from a string
// which in this case is the SL region name - we use it as a proposed filename but the user is free to change
std::string region_name = region->getName();
- std::replace_if(region_name.begin(), region_name.end(), std::not1(std::ptr_fun(isalnum)), '_');
- if (region_name.length() > 0)
+ std::replace_if(region_name.begin(), region_name.end(),
+ [](char c){ return ! std::isalnum(c); },
+ '_');
+ if (! region_name.empty())
{
filename << region_name;
filename << "_";
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 293ccc344c..65decbcd77 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -656,13 +656,11 @@ void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region)
}
// call refresh from region on all panels
- std::for_each(
- mInfoPanels.begin(),
- mInfoPanels.end(),
- llbind2nd(
- std::mem_fun(&LLPanelRegionInfo::refreshFromRegion),
- region));
- mEnvironmentPanel->refreshFromRegion(region);
+ for (const auto& infoPanel : mInfoPanels)
+ {
+ infoPanel->refreshFromRegion(region);
+ }
+ mEnvironmentPanel->refreshFromRegion(region);
}
// public
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 489d34edca..c0f773968d 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -757,11 +757,11 @@ S32 LLGestureMgr::getPlayingCount() const
}
-struct IsGesturePlaying : public std::unary_function<LLMultiGesture*, bool>
+struct IsGesturePlaying
{
bool operator()(const LLMultiGesture* gesture) const
{
- return gesture->mPlaying ? true : false;
+ return bool(gesture->mPlaying);
}
};
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 216a9f4c94..b0859060ba 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -3146,7 +3146,6 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, U32
gInventory.accountForUpdate(update);
}
- U32 changes = 0x0;
if (account)
{
mask |= LLInventoryObserver::CREATE;
@@ -3154,7 +3153,7 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, U32
//as above, this loop never seems to loop more than once per call
for (item_array_t::iterator it = items.begin(); it != items.end(); ++it)
{
- changes |= gInventory.updateItem(*it, mask);
+ gInventory.updateItem(*it, mask);
}
gInventory.notifyObservers();
gViewerWindow->getWindow()->decBusyCount();
@@ -4584,13 +4583,11 @@ void LLInventoryModel::FetchItemHttpHandler::processData(LLSD & content, LLCore:
}
// as above, this loop never seems to loop more than once per call
- U32 changes(0U);
for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); ++it)
{
- changes |= gInventory.updateItem(*it);
+ gInventory.updateItem(*it);
}
- // *HUH: Have computed 'changes', nothing uses it.
-
+
gInventory.notifyObservers();
gViewerWindow->getWindow()->decBusyCount();
}
diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp
index 1364067949..bbbde0711f 100644
--- a/indra/newview/lllegacyatmospherics.cpp
+++ b/indra/newview/lllegacyatmospherics.cpp
@@ -386,7 +386,6 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in)
return;
}
- const BOOL hide_clip_plane = TRUE;
LLColor4 target_fog(0.f, 0.2f, 0.5f, 0.f);
const F32 water_height = gAgent.getRegion() ? gAgent.getRegion()->getWaterHeight() : 0.f;
@@ -472,25 +471,12 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in)
render_fog_color = sky_fog_color;
- F32 fog_density = 0.f;
fog_distance = mFogRatio * distance;
if (camera_height > water_height)
{
LLColor4 fog(render_fog_color);
mGLFogCol = fog;
-
- if (hide_clip_plane)
- {
- // For now, set the density to extend to the cull distance.
- const F32 f_log = 2.14596602628934723963618357029f; // sqrt(fabs(log(0.01f)))
- fog_density = f_log/fog_distance;
- }
- else
- {
- const F32 f_log = 4.6051701859880913680359829093687f; // fabs(log(0.01f))
- fog_density = (f_log)/fog_distance;
- }
}
else
{
@@ -498,8 +484,6 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in)
F32 depth = water_height - camera_height;
// get the water param manager variables
- float water_fog_density = pwater->getModifiedWaterFogDensity(depth <= 0.0f);
-
LLColor4 water_fog_color(pwater->getWaterFogColor());
// adjust the color based on depth. We're doing linear approximations
@@ -512,9 +496,6 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in)
// set the gl fog color
mGLFogCol = fogCol;
-
- // set the density based on what the shaders use
- fog_density = water_fog_density * gSavedSettings.getF32("WaterGLFogDensityScale");
}
mFogColor = sky_fog_color;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 4dd0543693..14c039a0a2 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2059,16 +2059,6 @@ EMeshProcessingResult LLMeshRepoThread::physicsShapeReceived(const LLUUID& mesh_
if (volume->unpackVolumeFaces(stream, data_size))
{
//load volume faces into decomposition buffer
- S32 vertex_count = 0;
- S32 index_count = 0;
-
- for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i)
- {
- const LLVolumeFace& face = volume->getVolumeFace(i);
- vertex_count += face.mNumVertices;
- index_count += face.mNumIndices;
- }
-
d->mPhysicsShapeMesh.clear();
std::vector<LLVector3>& pos = d->mPhysicsShapeMesh.mPositions;
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index 3401587450..ae5dd6ec54 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -2680,8 +2680,6 @@ void LLModelPreview::clearBuffers()
void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
{
- U32 tri_count = 0;
- U32 vertex_count = 0;
U32 mesh_count = 0;
@@ -2816,8 +2814,6 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
mVertexBuffer[lod][mdl].push_back(vb);
- vertex_count += num_vertices;
- tri_count += num_indices / 3;
++mesh_count;
}
diff --git a/indra/newview/llpatchvertexarray.cpp b/indra/newview/llpatchvertexarray.cpp
index 6e3e375488..a7011dfad5 100644
--- a/indra/newview/llpatchvertexarray.cpp
+++ b/indra/newview/llpatchvertexarray.cpp
@@ -69,11 +69,9 @@ void LLPatchVertexArray::create(U32 surface_width, U32 patch_width, F32 meters_p
// (The -1 is there because an LLSurface has a buffer of 1 on
// its East and North edges).
U32 power_of_two = 1;
- U32 surface_order = 0;
while (power_of_two < (surface_width-1))
{
power_of_two *= 2;
- surface_order += 1;
}
if (power_of_two == (surface_width-1))
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index c267c3c699..30d0a22ef0 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -332,7 +332,6 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n
else
{
ECameraPreset new_camera_preset = (ECameraPreset)gSavedSettings.getU32("CameraPresetType");
- bool new_camera_offsets = false;
if (IS_CAMERA)
{
if (isDefaultCameraPreset(name))
@@ -354,7 +353,6 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n
{
new_camera_preset = CAMERA_PRESET_CUSTOM;
}
- new_camera_offsets = (!isDefaultCameraPreset(name) || (ECameraPreset)gSavedSettings.getU32("CameraPresetType") != new_camera_preset);
}
for (std::vector<std::string>::iterator it = name_list.begin(); it != name_list.end(); ++it)
{
diff --git a/indra/newview/llsceneview.cpp b/indra/newview/llsceneview.cpp
index f7aa63e34d..5e339a52bf 100644
--- a/indra/newview/llsceneview.cpp
+++ b/indra/newview/llsceneview.cpp
@@ -207,7 +207,7 @@ void LLSceneView::draw()
for (U32 i = 0; i < count; ++i)
{
F32 rad = size[idx][i];
- total += rad;
+ total += rad;
F32 y = (rad-size_domain[0])/size_range*size_rect.getHeight()+size_rect.mBottom;
F32 x = (F32) i / count * size_rect.getWidth() + size_rect.mLeft;
@@ -266,14 +266,11 @@ void LLSceneView::draw()
U32 count = triangles[idx].size();
- U32 total = 0;
-
gGL.begin(LLRender::LINE_STRIP);
//plot triangles
for (U32 i = 0; i < count; ++i)
{
U32 tri_count = triangles[idx][i];
- total += tri_count;
F32 y = (F32) (tri_count-tri_domain[0])/triangle_range*tri_rect.getHeight()+tri_rect.mBottom;
F32 x = (F32) i / count * tri_rect.getWidth() + tri_rect.mLeft;
@@ -290,15 +287,8 @@ void LLSceneView::draw()
gGL.end();
gGL.flush();
- U32 total_visible = 0;
count = visible_triangles[idx].size();
- for (U32 i = 0; i < count; ++i)
- {
- U32 tri_count = visible_triangles[idx][i];
- total_visible += tri_count;
- }
-
std::string label = llformat("%s Object Triangle Counts (Ktris) -- Visible: %.2f/%.2f (%.2f KB Visible)",
category[idx], total_visible_triangles[idx]/1024.f, total_triangles[idx]/1024.f, total_visible_bytes[idx]/1024.f);
diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp
index cf3519c1c7..8bdccfd9f6 100644
--- a/indra/newview/llskinningutil.cpp
+++ b/indra/newview/llskinningutil.cpp
@@ -264,6 +264,9 @@ void LLSkinningUtil::getPerVertexSkinMatrix(
// SL-366 - with weight validation/cleanup code, it should no longer be
// possible to hit the bad scale case.
llassert(valid_weights);
+ // When building for Release, the above llassert() goes away. Ward off
+ // variable-set-but-unused error.
+ (void)valid_weights;
}
void LLSkinningUtil::initJointNums(LLMeshSkinInfo* skin, LLVOAvatar *avatar)
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 69074b1670..ab559f1e6f 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -35,6 +35,7 @@
#include "llviewercontrol.h"
#include "lltexteditor.h"
+#include <memory>
#define MOUSE_LEAVE false
#define MOUSE_ENTER true
@@ -222,7 +223,7 @@ private:
LLPanel* mWrapperPanel;
// timer counts a lifetime of a toast
- std::auto_ptr<LLToastLifeTimer> mTimer;
+ std::unique_ptr<LLToastLifeTimer> mTimer;
F32 mToastLifetime; // in seconds
F32 mToastFadingTime; // in seconds
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index d603f584ff..815d8e9486 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1148,15 +1148,14 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
total_update_count--;
}
}
-
- S32 fetch_count = 0;
+
size_t min_update_count = llmin(MIN_UPDATE_COUNT,(S32)(entries.size()-max_priority_count));
S32 min_count = max_priority_count + min_update_count;
for (entries_list_t::iterator iter3 = entries.begin();
iter3 != entries.end(); )
{
LLViewerFetchedTexture* imagep = *iter3++;
- fetch_count += (imagep->updateFetch() ? 1 : 0);
+ imagep->updateFetch();
if (min_count <= min_update_count)
{
mLastFetchKey = LLTextureKey(imagep->getID(), (ETexListType)imagep->getTextureListType());
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 068e8a131d..51cf5f20c6 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -845,9 +845,6 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater());
- U32 index_count = 0;
- U32 vertex_count = 0;
-
group->clearDrawMap();
LLVertexBuffer* buffer = group->mVertexBuffer;
@@ -912,10 +909,6 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
llassert(facep->getGeomCount() == 4);
llassert(facep->getIndicesCount() == 6);
-
- vertex_count += facep->getGeomCount();
- index_count += facep->getIndicesCount();
-
S32 idx = draw_vec.size()-1;
BOOL fullbright = facep->isState(LLFace::FULLBRIGHT);
diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp
index 0aa0280b25..ceff5cc8ee 100644
--- a/indra/newview/llwatchdog.cpp
+++ b/indra/newview/llwatchdog.cpp
@@ -222,18 +222,17 @@ void LLWatchdog::run()
if(current_run_delta > (WATCHDOG_SLEEP_TIME_USEC * TIME_ELAPSED_MULTIPLIER))
{
LL_INFOS() << "Watchdog thread delayed: resetting entries." << LL_ENDL;
- std::for_each(mSuspects.begin(),
- mSuspects.end(),
- std::mem_fun(&LLWatchdogEntry::reset)
- );
+ for (const auto& suspect : mSuspects)
+ {
+ suspect->reset();
+ }
}
else
{
SuspectsRegistry::iterator result =
std::find_if(mSuspects.begin(),
- mSuspects.end(),
- std::not1(std::mem_fun(&LLWatchdogEntry::isAlive))
- );
+ mSuspects.end(),
+ [](const LLWatchdogEntry* suspect){ return ! suspect->isAlive(); });
if(result != mSuspects.end())
{
// error!!!
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 8abb49fba8..05e3aa783f 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -762,15 +762,11 @@ void LLWorld::updateParticles()
void LLWorld::renderPropertyLines()
{
- S32 region_count = 0;
- S32 vertex_count = 0;
-
for (region_list_t::iterator iter = mVisibleRegionList.begin();
iter != mVisibleRegionList.end(); ++iter)
{
LLViewerRegion* regionp = *iter;
- region_count++;
- vertex_count += regionp->renderPropertyLines();
+ regionp->renderPropertyLines();
}
}
@@ -778,7 +774,6 @@ void LLWorld::renderPropertyLines()
void LLWorld::updateNetStats()
{
F64Bits bits;
- U32 packets = 0;
for (region_list_t::iterator iter = mActiveRegionList.begin();
iter != mActiveRegionList.end(); ++iter)
@@ -786,7 +781,6 @@ void LLWorld::updateNetStats()
LLViewerRegion* regionp = *iter;
regionp->updateNetStats();
bits += regionp->mBitsReceived;
- packets += llfloor( regionp->mPacketsReceived );
regionp->mBitsReceived = (F32Bits)0.f;
regionp->mPacketsReceived = 0.f;
}
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index de5ac5ed3d..2e0b3506f9 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -908,7 +908,7 @@ class DarwinManifest(ViewerManifest):
# Let exception, if any, propagate -- if this doesn't
# work, we need the build to noisily fail!
oldpath = subprocess.check_output(
- ['objdump', '-macho', '-dylib-id', '-non-verbose',
+ ['objdump', '--macho', '--dylib-id', '--non-verbose',
os.path.join(relpkgdir, "BugsplatMac.framework", "BugsplatMac")]
).splitlines()[-1] # take the last line of output
self.run_command(