From f17a93f62262855ab8cc0faf296956c16de9699c Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sun, 27 Jun 2021 01:05:00 -0400 Subject: [PATCH] Fix build errors and warnings from msvc debug config --- indra/newview/llappviewer.cpp | 9 ++++++--- indra/newview/llcontrolavatar.cpp | 2 +- indra/newview/llmodelpreview.cpp | 2 +- indra/newview/lltoolpie.cpp | 1 - indra/newview/llviewerinventory.cpp | 4 ++-- indra/newview/llvoavatar.cpp | 3 +-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8b0f64dc3b0..8ec2d9d6cb5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3549,10 +3549,13 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["FirstRunThisInstall"] = gSavedSettings.getBOOL("FirstRunThisInstall"); gDebugInfo["StartupState"] = LLStartUp::getStartupStateString(); - std::vector<std::string> resolutions = gViewerWindow->getWindow()->getDisplaysResolutionList(); - for (auto res_iter : resolutions) + if (gViewerWindow && gViewerWindow->getWindow()) { - gDebugInfo["DisplayInfo"].append(res_iter); + std::vector<std::string> resolutions = gViewerWindow->getWindow()->getDisplaysResolutionList(); + for (auto res_iter : resolutions) + { + gDebugInfo["DisplayInfo"].append(res_iter); + } } writeDebugInfo(); // Save out debug_info.log early, in case of crash. diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 76657c8dae6..6de30e9a14b 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -588,7 +588,7 @@ void LLControlAvatar::updateAnimations() anims[anim_pair.first] = anim_pair.second; } #ifdef SHOW_DEBUG - LL_DEBUGS("AnimatedObjectsNotify") << "found anim for vol " << volp->getID() << " anim " << anim_it->first << " root " << mRootVolp->getID() << LL_ENDL; + LL_DEBUGS("AnimatedObjectsNotify") << "found anim for vol " << volp->getID() << " anim " << anim_pair.first << " root " << mRootVolp->getID() << LL_ENDL; #endif } } diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index ffb37752f45..e0a518fc9ff 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -595,7 +595,7 @@ void LLModelPreview::rebuildUploadData() high_lod_model->mSkinInfo.mBindShapeMatrix.store4a((F32*)bind_mat.mMatrix); LLQuaternion bind_rot = LLSkinningUtil::getUnscaledQuaternion(bind_mat); LLQuaternion identity; - if (!bind_rot.isEqualEps(identity, 0.01)) + if (!bind_rot.isEqualEps(identity, 0.01f)) { // Bind shape matrix is not in standard X-forward orientation. // Might be good idea to only show this once. It can be spammy. diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index c9e0fd7a159..759416a5a1b 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -704,7 +704,6 @@ bool LLToolPie::walkToClickedLocation() mPick = saved_pick; return false; } - return true; } bool LLToolPie::teleportToClickedLocation() diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index fdc528e0e24..34661fad616 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -114,7 +114,7 @@ class LLLocalizedInventoryItemsDictionary final : public LLSingleton<LLLocalized bool localizeInventoryObjectName(std::string& object_name) { #ifdef SHOW_DEBUG - LL_DEBUGS(LOG_LOCAL) << "Searching for localization: " << object_name << LL_ENDL; + LL_DEBUGS("InventoryLocalize") << "Searching for localization: " << object_name << LL_ENDL; #endif std::map<std::string, std::string>::const_iterator dictionary_iter = mInventoryItemsDict.find(object_name); @@ -124,7 +124,7 @@ class LLLocalizedInventoryItemsDictionary final : public LLSingleton<LLLocalized { object_name = dictionary_iter->second; #ifdef SHOW_DEBUG - LL_DEBUGS(LOG_LOCAL) << "Found, new name is: " << object_name << LL_ENDL; + LL_DEBUGS("InventoryLocalize") << "Found, new name is: " << object_name << LL_ENDL; #endif } return found; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e114562106a..558301ce687 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -10843,8 +10843,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() } // print any avatar textures we didn't already know about - for (LLAvatarAppearanceDictionary::Textures::const_iterator iter = LLAvatarAppearanceDictionary::getInstance()->getTextures().begin(); - iter != LLAvatarAppearanceDictionary::getInstance()->getTextures().end(); + for (const auto& tex_pair :LLAvatarAppearance::getDictionary()->getTextures()) { const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = tex_pair.second; // TODO: MULTI-WEARABLE: handle multiple textures for self -- GitLab