From 5ab34ccc5a5ec0abd6526b16379d7e29d8668ec4 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 21 Jan 2022 19:58:38 +0200 Subject: SL-1159 Fix inbox consolidation failure --- indra/newview/llinventorymodel.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index ba453471c6..7c1650ae58 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -461,9 +461,18 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E LLViewerInventoryCategory* cat = getCategory(*it); changeCategoryParent(cat, main_id, TRUE); } - + // Purge the emptied folder - removeCategory(folder_id); + // Note that this might be a system folder, don't validate removability + LLViewerInventoryCategory* cat = getCategory(folder_id); + if (cat) + { + const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH); + if (trash_id.notNull()) + { + changeCategoryParent(cat, trash_id, TRUE); + } + } remove_inventory_category(folder_id, NULL); } } -- cgit v1.3 From 3915c8417d6d6c493c175d1e99bb4776a8e25fd0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 11 May 2022 21:19:55 +0100 Subject: SL-17243 - ViewerStats includes details on warning conditions in inventory, if any are encountered. --- indra/newview/llinventorymodel.cpp | 113 +++++++++++++++++++++++-------------- indra/newview/llinventorymodel.h | 43 +++++++++----- 2 files changed, 102 insertions(+), 54 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 37500176ea..0e619991e6 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -135,15 +135,7 @@ bool LLCanCache::operator()(LLInventoryCategory* cat, LLInventoryItem* item) ///---------------------------------------------------------------------------- /// Class LLInventoryValidationInfo ///---------------------------------------------------------------------------- -LLInventoryValidationInfo::LLInventoryValidationInfo(): - mFatalErrorCount(0), - mWarningCount(0), - mLoopCount(0), - mOrphanedCount(0), - mInitialized(false), - mFatalNoRootFolder(false), - mFatalNoLibraryRootFolder(false), - mFatalQADebugMode(false) +LLInventoryValidationInfo::LLInventoryValidationInfo() { } @@ -173,6 +165,26 @@ void LLInventoryValidationInfo::asLLSD(LLSD& sd) const sd["fatal_no_root_folder"] = mFatalNoRootFolder; sd["fatal_no_library_root_folder"] = mFatalNoLibraryRootFolder; sd["fatal_qa_debug_mode"] = mFatalQADebugMode; + if (mWarningCount>0) + { + sd["warnings"] = LLSD::emptyArray(); + sd["warnings"]["category_map_size"] = mWarningCategoryMapSize; + sd["warnings"]["null_cat"] = mWarningNullCat; + sd["warnings"]["unknown_ancestor_status"] = mWarningUnknownAncestorStatus; + sd["warnings"]["cat_id_index_mismatch"] = mWarningCatIDIndexMismatch; + sd["warnings"]["null_parent"] = mWarningNullParent; + sd["warnings"]["direct_descendents"] = mWarningDirectDescendents; + sd["warnings"]["invalid_descendent_count"] = mWarningInvalidDescendentCount; + sd["warnings"]["null_item_at_index"] = mWarningNullItemAtIndex; + sd["warnings"]["wrong_parent_for_item"] = mWarningWrongParentForItem; + sd["warnings"]["item_not_in_top_map"] = mWarningItemNotInTopMap; + sd["warnings"]["topmost_ancestor_not_found"] = mWarningTopmostAncestorNotFound; + sd["warnings"]["topmost_ancestor_not_recognized"] = mWarningTopmostAncestorNotRecognized; + sd["warnings"]["item_id_mismatch"] = mWarningItemIDMismatch; + sd["warnings"]["missing_system_folder_can_create"] = mWarningMissingSystemFolderCanCreate; + sd["warnings"]["non_fatal_system_duplicate_under_root"] = mWarningNonFatalSystemDuplicateUnderRoot; + sd["warnings"]["non_fatal_system_duplicate_elsewhere"] = mWarningSystemDuplicateElsewhere; + } if (mMissingRequiredSystemFolders.size()>0) { sd["missing_system_folders"] = LLSD::emptyArray(); @@ -344,13 +356,13 @@ const LLViewerInventoryCategory* LLInventoryModel::getFirstDescendantOf(const LL return NULL; } -LLInventoryModel::EAnscestorResult LLInventoryModel::getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const +LLInventoryModel::EAncestorResult LLInventoryModel::getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const { LLInventoryObject *object = getObject(object_id); if (!object) { LL_WARNS(LOG_INV) << "Unable to trace topmost ancestor, initial object " << object_id << " does not exist" << LL_ENDL; - return ANSCESTOR_MISSING; + return ANCESTOR_MISSING; } std::set object_ids{ object_id }; // loop protection @@ -360,19 +372,19 @@ LLInventoryModel::EAnscestorResult LLInventoryModel::getObjectTopmostAncestor(co if (object_ids.find(parent_id) != object_ids.end()) { LL_WARNS(LOG_INV) << "Detected a loop on an object " << parent_id << " when searching for ancestor of " << object_id << LL_ENDL; - return ANSCESTOR_LOOP; + return ANCESTOR_LOOP; } object_ids.insert(parent_id); LLInventoryObject *parent_object = getObject(parent_id); if (!parent_object) { LL_WARNS(LOG_INV) << "unable to trace topmost ancestor of " << object_id << ", missing item for uuid " << parent_id << LL_ENDL; - return ANSCESTOR_MISSING; + return ANCESTOR_MISSING; } object = parent_object; } result = object->getUUID(); - return ANSCESTOR_OK; + return ANCESTOR_OK; } // Get the object by id. Returns NULL if not found. @@ -3899,7 +3911,7 @@ LLPointer LLInventoryModel::validate() const { LLPointer validation_info = new LLInventoryValidationInfo; S32 fatal_errs = 0; - S32 warnings = 0; + S32 warning_count= 0; S32 loops = 0; S32 orphaned = 0; @@ -3922,7 +3934,9 @@ LLPointer LLInventoryModel::validate() const // ParentChild should be one larger because of the special entry for null uuid. LL_INFOS("Inventory") << "unexpected sizes: cat map size " << mCategoryMap.size() << " parent/child " << mParentChildCategoryTree.size() << LL_ENDL; - warnings++; + + validation_info->mWarningCategoryMapSize++; + warning_count++; } S32 cat_lock = 0; S32 item_lock = 0; @@ -3941,32 +3955,35 @@ LLPointer LLInventoryModel::validate() const if (!cat) { LL_WARNS("Inventory") << "null cat" << LL_ENDL; - warnings++; + validation_info->mWarningNullCat++; + warning_count++; continue; } LLUUID topmost_ancestor_id; // Will leave as null uuid on failure - EAnscestorResult res = getObjectTopmostAncestor(cat_id, topmost_ancestor_id); + EAncestorResult res = getObjectTopmostAncestor(cat_id, topmost_ancestor_id); switch (res) { - case ANSCESTOR_MISSING: + case ANCESTOR_MISSING: orphaned++; break; - case ANSCESTOR_LOOP: + case ANCESTOR_LOOP: loops++; break; - case ANSCESTOR_OK: + case ANCESTOR_OK: break; default: LL_WARNS("Inventory") << "Unknown ancestor error for " << cat_id << LL_ENDL; - warnings++; + validation_info->mWarningUnknownAncestorStatus++; + warning_count++; break; } if (cat_id != cat->getUUID()) { LL_WARNS("Inventory") << "cat id/index mismatch " << cat_id << " " << cat->getUUID() << LL_ENDL; - warnings++; + validation_info->mWarningCatIDIndexMismatch++; + warning_count++; } if (cat->getParentUUID().isNull()) @@ -3976,7 +3993,8 @@ LLPointer LLInventoryModel::validate() const LL_WARNS("Inventory") << "cat " << cat_id << " has no parent, but is not root (" << getRootFolderID() << ") or library root (" << getLibraryRootFolderID() << ")" << LL_ENDL; - warnings++; + validation_info->mWarningNullParent++; + warning_count++; } } cat_array_t* cats; @@ -3985,7 +4003,8 @@ LLPointer LLInventoryModel::validate() const if (!cats || !items) { LL_WARNS("Inventory") << "invalid direct descendents for " << cat_id << LL_ENDL; - warnings++; + validation_info->mWarningDirectDescendents++; + warning_count++; continue; } if (cat->getDescendentCount() == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN) @@ -4003,7 +4022,8 @@ LLPointer LLInventoryModel::validate() const << " cached " << cat->getDescendentCount() << " expected " << cats->size() << "+" << items->size() << "=" << cats->size() +items->size() << LL_ENDL; - warnings++; + validation_info->mWarningInvalidDescendentCount++; + warning_count++; } } if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN) @@ -4027,7 +4047,8 @@ LLPointer LLInventoryModel::validate() const if (!item) { LL_WARNS("Inventory") << "null item at index " << i << " for cat " << cat_id << LL_ENDL; - warnings++; + validation_info->mWarningNullItemAtIndex++; + warning_count++; continue; } @@ -4038,7 +4059,8 @@ LLPointer LLInventoryModel::validate() const LL_WARNS("Inventory") << "wrong parent for " << item_id << " found " << item->getParentUUID() << " expected " << cat_id << LL_ENDL; - warnings++; + validation_info->mWarningWrongParentForItem++; + warning_count++; } @@ -4048,7 +4070,8 @@ LLPointer LLInventoryModel::validate() const { LL_WARNS("Inventory") << "item " << item_id << " found as child of " << cat_id << " but not in top level mItemMap" << LL_ENDL; - warnings++; + validation_info->mWarningItemNotInTopMap++; + warning_count++; } else { @@ -4062,11 +4085,12 @@ LLPointer LLInventoryModel::validate() const // Topmost ancestor should be root or library. LLUUID topmost_ancestor_id; - EAnscestorResult found = getObjectTopmostAncestor(item_id, topmost_ancestor_id); - if (found != ANSCESTOR_OK) + EAncestorResult found = getObjectTopmostAncestor(item_id, topmost_ancestor_id); + if (found != ANCESTOR_OK) { LL_WARNS("Inventory") << "unable to find topmost ancestor for " << item_id << LL_ENDL; - warnings++; + validation_info->mWarningTopmostAncestorNotFound++; + warning_count++; } else { @@ -4077,7 +4101,8 @@ LLPointer LLInventoryModel::validate() const << " got " << topmost_ancestor_id << " expected " << getRootFolderID() << " or " << getLibraryRootFolderID() << LL_ENDL; - warnings++; + validation_info->mWarningTopmostAncestorNotRecognized++; + warning_count++; } } } @@ -4120,7 +4145,7 @@ LLPointer LLInventoryModel::validate() const LLFolderType::EType folder_type = cat->getPreferredType(); bool cat_is_in_library = false; LLUUID topmost_id; - if (getObjectTopmostAncestor(cat->getUUID(),topmost_id) == ANSCESTOR_OK && topmost_id == getLibraryRootFolderID()) + if (getObjectTopmostAncestor(cat->getUUID(),topmost_id) == ANCESTOR_OK && topmost_id == getLibraryRootFolderID()) { cat_is_in_library = true; } @@ -4153,7 +4178,8 @@ LLPointer LLInventoryModel::validate() const if (item->getUUID() != item_id) { LL_WARNS("Inventory") << "item_id " << item_id << " does not match " << item->getUUID() << LL_ENDL; - warnings++; + validation_info->mWarningItemIDMismatch++; + warning_count++; } const LLUUID& parent_id = item->getParentUUID(); @@ -4289,13 +4315,15 @@ LLPointer LLInventoryModel::validate() const if (is_automatic) { LL_WARNS("Inventory") << "Fatal inventory corruption: cannot create system folder of type " << ft << LL_ENDL; - fatal_errs++; validation_info->mMissingRequiredSystemFolders.insert(folder_type); + fatal_errs++; } else { // Can create, and will when needed. - warnings++; + // (Not sure this is really a warning, but worth logging) + validation_info->mWarningMissingSystemFolderCanCreate++; + warning_count++; } } else if (count_under_root > 1) @@ -4306,6 +4334,7 @@ LLPointer LLInventoryModel::validate() const { // It is a fatal problem or can lead to fatal problems for COF, // outfits, trash and other non-automatic folders. + validation_info->mFatalSystemDuplicate++; fatal_errs++; } else @@ -4313,13 +4342,15 @@ LLPointer LLInventoryModel::validate() const // For automatic folders it's not a fatal issue and shouldn't // break inventory or other functionality further // Exception: FT_SETTINGS is not automatic, but only deserves a warning. - warnings++; + validation_info->mWarningNonFatalSystemDuplicateUnderRoot++; + warning_count++; } } if (count_elsewhere > 0) { LL_WARNS("Inventory") << "Found " << count_elsewhere << " extra folders of type " << ft << " outside of root" << LL_ENDL; - warnings++; + validation_info->mWarningSystemDuplicateElsewhere++; + warning_count++; } } } @@ -4341,10 +4372,10 @@ LLPointer LLInventoryModel::validate() const // FIXME need to fail login and tell user to retry, contact support if problem persists. bool valid = (fatal_errs == 0); - LL_INFOS("Inventory") << "Validate done, fatal errors: " << fatal_errs << ", warnings: " << warnings << ", valid: " << valid << LL_ENDL; + LL_INFOS("Inventory") << "Validate done, fatal errors: " << fatal_errs << ", warnings: " << warning_count << ", valid: " << valid << LL_ENDL; validation_info->mFatalErrorCount = fatal_errs; - validation_info->mWarningCount = warnings; + validation_info->mWarningCount = warning_count; validation_info->mLoopCount = loops; validation_info->mOrphanedCount = orphaned; diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index eeec89bfb0..e19f41bd24 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -66,14 +66,31 @@ public: void asLLSD(LLSD& sd) const; - S32 mFatalErrorCount; - S32 mWarningCount; - S32 mLoopCount; // Presence of folders whose ansestors loop onto themselves - S32 mOrphanedCount; // Missing or orphaned items, links and folders - bool mInitialized; - bool mFatalNoRootFolder; - bool mFatalNoLibraryRootFolder; - bool mFatalQADebugMode; + S32 mWarningCount{0}; + S32 mWarningCategoryMapSize{0}; + S32 mWarningNullCat{0}; + S32 mWarningUnknownAncestorStatus{0}; + S32 mWarningCatIDIndexMismatch{0}; + S32 mWarningNullParent{0}; + S32 mWarningDirectDescendents{0}; + S32 mWarningInvalidDescendentCount{0}; + S32 mWarningNullItemAtIndex{0}; + S32 mWarningWrongParentForItem{0}; + S32 mWarningItemNotInTopMap{0}; + S32 mWarningTopmostAncestorNotFound{0}; + S32 mWarningTopmostAncestorNotRecognized{0}; + S32 mWarningItemIDMismatch{0}; + S32 mWarningMissingSystemFolderCanCreate{0}; + S32 mWarningNonFatalSystemDuplicateUnderRoot{0}; + S32 mWarningSystemDuplicateElsewhere{0}; + S32 mLoopCount{0}; // Presence of folders whose ancestors loop onto themselves + S32 mOrphanedCount{0}; // Missing or orphaned items, links and folders + bool mInitialized{false}; + S32 mFatalErrorCount{0}; + bool mFatalNoRootFolder{false}; + S32 mFatalSystemDuplicate{0}; + bool mFatalNoLibraryRootFolder{false}; + bool mFatalQADebugMode{false}; std::set mMissingRequiredSystemFolders; std::set mDuplicateRequiredSystemFolders; }; @@ -286,13 +303,13 @@ public: // Check if one object has a parent chain up to the category specified by UUID. BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const; - enum EAnscestorResult{ - ANSCESTOR_OK = 0, - ANSCESTOR_MISSING = 1, - ANSCESTOR_LOOP = 2, + enum EAncestorResult{ + ANCESTOR_OK = 0, + ANCESTOR_MISSING = 1, + ANCESTOR_LOOP = 2, }; // Follow parent chain to the top. - EAnscestorResult getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const; + EAncestorResult getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const; //-------------------------------------------------------------------- // Find -- cgit v1.3 From 57ae9c4dc4d97fd93faa33037ff0cb40ca9ecd54 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 12 May 2022 13:39:01 +0100 Subject: SL-17243 - moved inventory warnings to a map --- indra/newview/llinventorymodel.cpp | 87 ++++++++++++++++++-------------------- indra/newview/llinventorymodel.h | 23 +++------- 2 files changed, 45 insertions(+), 65 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 0e619991e6..4dee698a07 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -157,7 +157,6 @@ std::ostream& operator<<(std::ostream& os, const LLInventoryValidationInfo& v) void LLInventoryValidationInfo::asLLSD(LLSD& sd) const { sd["fatal_error_count"] = mFatalErrorCount; - sd["warning_count"] = mWarningCount; sd["loop_count"] = mLoopCount; sd["orphaned_count"] = mOrphanedCount; sd["initialized"] = mInitialized; @@ -165,25 +164,19 @@ void LLInventoryValidationInfo::asLLSD(LLSD& sd) const sd["fatal_no_root_folder"] = mFatalNoRootFolder; sd["fatal_no_library_root_folder"] = mFatalNoLibraryRootFolder; sd["fatal_qa_debug_mode"] = mFatalQADebugMode; + + sd["warning_count"] = mWarningCount; if (mWarningCount>0) { sd["warnings"] = LLSD::emptyArray(); - sd["warnings"]["category_map_size"] = mWarningCategoryMapSize; - sd["warnings"]["null_cat"] = mWarningNullCat; - sd["warnings"]["unknown_ancestor_status"] = mWarningUnknownAncestorStatus; - sd["warnings"]["cat_id_index_mismatch"] = mWarningCatIDIndexMismatch; - sd["warnings"]["null_parent"] = mWarningNullParent; - sd["warnings"]["direct_descendents"] = mWarningDirectDescendents; - sd["warnings"]["invalid_descendent_count"] = mWarningInvalidDescendentCount; - sd["warnings"]["null_item_at_index"] = mWarningNullItemAtIndex; - sd["warnings"]["wrong_parent_for_item"] = mWarningWrongParentForItem; - sd["warnings"]["item_not_in_top_map"] = mWarningItemNotInTopMap; - sd["warnings"]["topmost_ancestor_not_found"] = mWarningTopmostAncestorNotFound; - sd["warnings"]["topmost_ancestor_not_recognized"] = mWarningTopmostAncestorNotRecognized; - sd["warnings"]["item_id_mismatch"] = mWarningItemIDMismatch; - sd["warnings"]["missing_system_folder_can_create"] = mWarningMissingSystemFolderCanCreate; - sd["warnings"]["non_fatal_system_duplicate_under_root"] = mWarningNonFatalSystemDuplicateUnderRoot; - sd["warnings"]["non_fatal_system_duplicate_elsewhere"] = mWarningSystemDuplicateElsewhere; + for (auto const& it : mWarnings) + { + S32 val =LLSD::Integer(it.second); + if (val>0) + { + sd["warnings"][it.first] = val; + } + } } if (mMissingRequiredSystemFolders.size()>0) { @@ -3912,8 +3905,8 @@ LLPointer LLInventoryModel::validate() const LLPointer validation_info = new LLInventoryValidationInfo; S32 fatal_errs = 0; S32 warning_count= 0; - S32 loops = 0; - S32 orphaned = 0; + S32 loop_count = 0; + S32 orphaned_count = 0; if (getRootFolderID().isNull()) { @@ -3935,7 +3928,7 @@ LLPointer LLInventoryModel::validate() const LL_INFOS("Inventory") << "unexpected sizes: cat map size " << mCategoryMap.size() << " parent/child " << mParentChildCategoryTree.size() << LL_ENDL; - validation_info->mWarningCategoryMapSize++; + validation_info->mWarnings["category_map_size"]++; warning_count++; } S32 cat_lock = 0; @@ -3955,7 +3948,7 @@ LLPointer LLInventoryModel::validate() const if (!cat) { LL_WARNS("Inventory") << "null cat" << LL_ENDL; - validation_info->mWarningNullCat++; + validation_info->mWarnings["null_cat"]++; warning_count++; continue; } @@ -3965,16 +3958,16 @@ LLPointer LLInventoryModel::validate() const switch (res) { case ANCESTOR_MISSING: - orphaned++; + orphaned_count++; break; case ANCESTOR_LOOP: - loops++; + loop_count++; break; case ANCESTOR_OK: break; default: LL_WARNS("Inventory") << "Unknown ancestor error for " << cat_id << LL_ENDL; - validation_info->mWarningUnknownAncestorStatus++; + validation_info->mWarnings["unknown_ancestor_status"]++; warning_count++; break; } @@ -3982,7 +3975,7 @@ LLPointer LLInventoryModel::validate() const if (cat_id != cat->getUUID()) { LL_WARNS("Inventory") << "cat id/index mismatch " << cat_id << " " << cat->getUUID() << LL_ENDL; - validation_info->mWarningCatIDIndexMismatch++; + validation_info->mWarnings["cat_id_index_mismatch"]++; warning_count++; } @@ -3993,7 +3986,7 @@ LLPointer LLInventoryModel::validate() const LL_WARNS("Inventory") << "cat " << cat_id << " has no parent, but is not root (" << getRootFolderID() << ") or library root (" << getLibraryRootFolderID() << ")" << LL_ENDL; - validation_info->mWarningNullParent++; + validation_info->mWarnings["null_parent"]++; warning_count++; } } @@ -4003,7 +3996,7 @@ LLPointer LLInventoryModel::validate() const if (!cats || !items) { LL_WARNS("Inventory") << "invalid direct descendents for " << cat_id << LL_ENDL; - validation_info->mWarningDirectDescendents++; + validation_info->mWarnings["direct_descendents"]++; warning_count++; continue; } @@ -4022,7 +4015,7 @@ LLPointer LLInventoryModel::validate() const << " cached " << cat->getDescendentCount() << " expected " << cats->size() << "+" << items->size() << "=" << cats->size() +items->size() << LL_ENDL; - validation_info->mWarningInvalidDescendentCount++; + validation_info->mWarnings["invalid_descendent_count"]++; warning_count++; } } @@ -4047,7 +4040,7 @@ LLPointer LLInventoryModel::validate() const if (!item) { LL_WARNS("Inventory") << "null item at index " << i << " for cat " << cat_id << LL_ENDL; - validation_info->mWarningNullItemAtIndex++; + validation_info->mWarnings["null_item_at_index"]++; warning_count++; continue; } @@ -4059,7 +4052,7 @@ LLPointer LLInventoryModel::validate() const LL_WARNS("Inventory") << "wrong parent for " << item_id << " found " << item->getParentUUID() << " expected " << cat_id << LL_ENDL; - validation_info->mWarningWrongParentForItem++; + validation_info->mWarnings["wrong_parent_for_item"]++; warning_count++; } @@ -4070,7 +4063,7 @@ LLPointer LLInventoryModel::validate() const { LL_WARNS("Inventory") << "item " << item_id << " found as child of " << cat_id << " but not in top level mItemMap" << LL_ENDL; - validation_info->mWarningItemNotInTopMap++; + validation_info->mWarnings["item_not_in_top_map"]++; warning_count++; } else @@ -4089,7 +4082,7 @@ LLPointer LLInventoryModel::validate() const if (found != ANCESTOR_OK) { LL_WARNS("Inventory") << "unable to find topmost ancestor for " << item_id << LL_ENDL; - validation_info->mWarningTopmostAncestorNotFound++; + validation_info->mWarnings["topmost_ancestor_not_found"]++; warning_count++; } else @@ -4101,7 +4094,7 @@ LLPointer LLInventoryModel::validate() const << " got " << topmost_ancestor_id << " expected " << getRootFolderID() << " or " << getLibraryRootFolderID() << LL_ENDL; - validation_info->mWarningTopmostAncestorNotRecognized++; + validation_info->mWarnings["topmost_ancestor_not_recognized"]++; warning_count++; } } @@ -4118,7 +4111,7 @@ LLPointer LLInventoryModel::validate() const { LL_WARNS("Inventory") << "cat " << cat_id << " name [" << cat->getName() << "] orphaned - no child cat array for alleged parent " << parent_id << LL_ENDL; - orphaned++; + orphaned_count++; } else { @@ -4136,7 +4129,7 @@ LLPointer LLInventoryModel::validate() const { LL_WARNS("Inventory") << "cat " << cat_id << " name [" << cat->getName() << "] orphaned - not found in child cat array of alleged parent " << parent_id << LL_ENDL; - orphaned++; + orphaned_count++; } } } @@ -4178,7 +4171,7 @@ LLPointer LLInventoryModel::validate() const if (item->getUUID() != item_id) { LL_WARNS("Inventory") << "item_id " << item_id << " does not match " << item->getUUID() << LL_ENDL; - validation_info->mWarningItemIDMismatch++; + validation_info->mWarnings["item_id_mismatch"]++; warning_count++; } @@ -4186,7 +4179,7 @@ LLPointer LLInventoryModel::validate() const if (parent_id.isNull()) { LL_WARNS("Inventory") << "item " << item_id << " name [" << item->getName() << "] has null parent id!" << LL_ENDL; - orphaned++; + orphaned_count++; } else { @@ -4197,7 +4190,7 @@ LLPointer LLInventoryModel::validate() const { LL_WARNS("Inventory") << "item " << item_id << " name [" << item->getName() << "] orphaned - alleged parent has no child items list " << parent_id << LL_ENDL; - orphaned++; + orphaned_count++; } else { @@ -4214,7 +4207,7 @@ LLPointer LLInventoryModel::validate() const { LL_WARNS("Inventory") << "item " << item_id << " name [" << item->getName() << "] orphaned - not found as child of alleged parent " << parent_id << LL_ENDL; - orphaned++; + orphaned_count++; } } @@ -4232,18 +4225,18 @@ LLPointer LLInventoryModel::validate() const LL_WARNS("Inventory") << "link " << item->getUUID() << " type " << item->getActualType() << " missing backlink info at target_id " << target_id << LL_ENDL; - orphaned++; + orphaned_count++; } // Links should have referents. if (item->getActualType() == LLAssetType::AT_LINK && !target_item) { LL_WARNS("Inventory") << "broken item link " << item->getName() << " id " << item->getUUID() << LL_ENDL; - orphaned++; + orphaned_count++; } else if (item->getActualType() == LLAssetType::AT_LINK_FOLDER && !target_cat) { LL_WARNS("Inventory") << "broken folder link " << item->getName() << " id " << item->getUUID() << LL_ENDL; - orphaned++; + orphaned_count++; } if (target_item && target_item->getIsLinkType()) { @@ -4322,7 +4315,7 @@ LLPointer LLInventoryModel::validate() const { // Can create, and will when needed. // (Not sure this is really a warning, but worth logging) - validation_info->mWarningMissingSystemFolderCanCreate++; + validation_info->mWarnings["missing_system_folder_can_create"]++; warning_count++; } } @@ -4342,14 +4335,14 @@ LLPointer LLInventoryModel::validate() const // For automatic folders it's not a fatal issue and shouldn't // break inventory or other functionality further // Exception: FT_SETTINGS is not automatic, but only deserves a warning. - validation_info->mWarningNonFatalSystemDuplicateUnderRoot++; + validation_info->mWarnings["non_fatal_system_duplicate_under_root"]++; warning_count++; } } if (count_elsewhere > 0) { LL_WARNS("Inventory") << "Found " << count_elsewhere << " extra folders of type " << ft << " outside of root" << LL_ENDL; - validation_info->mWarningSystemDuplicateElsewhere++; + validation_info->mWarnings["non_fatal_system_duplicate_elsewhere"]++; warning_count++; } } @@ -4376,8 +4369,8 @@ LLPointer LLInventoryModel::validate() const validation_info->mFatalErrorCount = fatal_errs; validation_info->mWarningCount = warning_count; - validation_info->mLoopCount = loops; - validation_info->mOrphanedCount = orphaned; + validation_info->mLoopCount = loop_count; + validation_info->mOrphanedCount = orphaned_count; return validation_info; } diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index e19f41bd24..c4133ff9bb 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -65,32 +65,19 @@ public: void toOstream(std::ostream& os) const; void asLLSD(LLSD& sd) const; - + bool mInitialized{false}; S32 mWarningCount{0}; - S32 mWarningCategoryMapSize{0}; - S32 mWarningNullCat{0}; - S32 mWarningUnknownAncestorStatus{0}; - S32 mWarningCatIDIndexMismatch{0}; - S32 mWarningNullParent{0}; - S32 mWarningDirectDescendents{0}; - S32 mWarningInvalidDescendentCount{0}; - S32 mWarningNullItemAtIndex{0}; - S32 mWarningWrongParentForItem{0}; - S32 mWarningItemNotInTopMap{0}; - S32 mWarningTopmostAncestorNotFound{0}; - S32 mWarningTopmostAncestorNotRecognized{0}; - S32 mWarningItemIDMismatch{0}; - S32 mWarningMissingSystemFolderCanCreate{0}; - S32 mWarningNonFatalSystemDuplicateUnderRoot{0}; - S32 mWarningSystemDuplicateElsewhere{0}; + std::map mWarnings; + S32 mLoopCount{0}; // Presence of folders whose ancestors loop onto themselves S32 mOrphanedCount{0}; // Missing or orphaned items, links and folders - bool mInitialized{false}; + S32 mFatalErrorCount{0}; bool mFatalNoRootFolder{false}; S32 mFatalSystemDuplicate{0}; bool mFatalNoLibraryRootFolder{false}; bool mFatalQADebugMode{false}; + std::set mMissingRequiredSystemFolders; std::set mDuplicateRequiredSystemFolders; }; -- cgit v1.3 From 076a89506243e8d4037f34c2a78278ff6ee0f1f7 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 21 Jun 2022 17:55:29 +0300 Subject: SL-17635 remove unused variables --- indra/llmath/llvolume.cpp | 4 ---- indra/llmessage/lldatapacker.cpp | 6 ------ indra/llmessage/llthrottle.cpp | 2 -- indra/llprimitive/llmodel.cpp | 5 ----- indra/llui/lllayoutstack.cpp | 2 -- indra/llwindow/llwindowmacosx.cpp | 9 +-------- indra/newview/llfasttimerview.cpp | 14 -------------- indra/newview/llinventorymodel.cpp | 7 ++----- indra/newview/lllegacyatmospherics.cpp | 20 -------------------- indra/newview/llmeshrepository.cpp | 11 ----------- indra/newview/llmodelpreview.cpp | 5 ----- indra/newview/llpatchvertexarray.cpp | 2 -- indra/newview/llpresetsmanager.cpp | 2 -- indra/newview/llsceneview.cpp | 10 ---------- indra/newview/llviewertexturelist.cpp | 5 ++--- indra/newview/llvopartgroup.cpp | 6 ------ indra/newview/llvovolume.cpp | 10 ---------- indra/newview/llworld.cpp | 5 +---- 18 files changed, 6 insertions(+), 119 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 5099920f32..3de5e04177 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -1624,9 +1624,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, //genNGon(params, llfloor(MIN_DETAIL_FACES * detail), 4.f, 0.f); genNGon(params, llfloor(MIN_DETAIL_FACES * detail)); - F32 t = 0.f; - F32 tStep = 1.0f / mPath.size(); - F32 toggle = 0.5f; for (S32 i=0;i<(S32)mPath.size();i++) { @@ -1635,7 +1632,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, toggle = -0.5f; else toggle = 0.5f; - t += tStep; } } diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp index 96c1297e0d..b6adc102d2 100644 --- a/indra/llmessage/lldatapacker.cpp +++ b/indra/llmessage/lldatapacker.cpp @@ -127,13 +127,7 @@ BOOL LLDataPacker::unpackFixed(F32 &value, const char *name, total_bits++; } - S32 min_val; U32 max_val; - if (is_signed) - { - min_val = 1 << int_bits; - min_val *= -1; - } max_val = 1 << int_bits; F32 fixed_val; diff --git a/indra/llmessage/llthrottle.cpp b/indra/llmessage/llthrottle.cpp index 7605da4d3f..935af2aa5a 100644 --- a/indra/llmessage/llthrottle.cpp +++ b/indra/llmessage/llthrottle.cpp @@ -374,7 +374,6 @@ BOOL LLThrottleGroup::dynamicAdjust() } mDynamicAdjustTime = mt_sec; - S32 total = 0; // Update historical information for (i = 0; i < TC_EOF; i++) { @@ -391,7 +390,6 @@ BOOL LLThrottleGroup::dynamicAdjust() } mBitsSentThisPeriod[i] = 0; - total += ll_round(mBitsSentHistory[i]); } // Look for busy channels diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 204ff63712..cc85f3d7a8 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -881,8 +881,6 @@ LLSD LLModel::writeModel( LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BOOL as_slm) { - U32 bytes = 0; - std::string::size_type cur_offset = 0; LLSD header; @@ -904,7 +902,6 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BO header["skin"]["offset"] = (LLSD::Integer) cur_offset; header["skin"]["size"] = (LLSD::Integer) size; cur_offset += size; - bytes += size; } } @@ -920,7 +917,6 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BO header["physics_convex"]["offset"] = (LLSD::Integer) cur_offset; header["physics_convex"]["size"] = (LLSD::Integer) size; cur_offset += size; - bytes += size; } } @@ -942,7 +938,6 @@ LLSD LLModel::writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite, BO header[model_names[i]]["offset"] = (LLSD::Integer) cur_offset; header[model_names[i]]["size"] = (LLSD::Integer) size; cur_offset += size; - bytes += size; } } diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index aac28e04b9..77938edf27 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -395,7 +395,6 @@ void LLLayoutStack::updateLayout() space_to_distribute += panelp ? ll_round((F32)mPanelSpacing * panelp->getVisibleAmount()) : 0; S32 remaining_space = space_to_distribute; - F32 fraction_distributed = 0.f; if (space_to_distribute > 0 && total_visible_fraction > 0.f) { // give space proportionally to visible auto resize panels BOOST_FOREACH(LLLayoutPanel* panelp, mPanels) @@ -404,7 +403,6 @@ void LLLayoutStack::updateLayout() { F32 fraction_to_distribute = (panelp->mFractionalSize * panelp->getAutoResizeFactor()) / (total_visible_fraction); S32 delta = ll_round((F32)space_to_distribute * fraction_to_distribute); - fraction_distributed += fraction_to_distribute; panelp->mTargetDim += delta; remaining_space -= delta; } diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index bc4f07941b..5c8fd62d3b 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -621,8 +621,6 @@ void LLWindowMacOSX::getMouseDeltas(float* delta) BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL enable_vsync) { - BOOL glNeedsInit = FALSE; - mFullscreen = fullscreen; if (mWindow == NULL) @@ -637,9 +635,6 @@ BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits mGLView = createOpenGLView(mWindow, mFSAASamples, enable_vsync); mContext = getCGLContextObj(mGLView); - // Since we just created the context, it needs to be set up. - glNeedsInit = TRUE; - gGLManager.mVRAM = getVramSize(mGLView); } @@ -1721,9 +1716,7 @@ void LLSplashScreenMacOSX::updateImpl(const std::string& mesg) { if(mWindow != NULL) { - CFStringRef string = NULL; - - string = CFStringCreateWithCString(NULL, mesg.c_str(), kCFStringEncodingUTF8); + CFStringCreateWithCString(NULL, mesg.c_str(), kCFStringEncodingUTF8); } } 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 scratch = new LLImageRaw(1024, 512, 3); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 37500176ea..88cf89d4d4 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -3132,7 +3132,6 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, U32 gInventory.accountForUpdate(update); } - U32 changes = 0x0; if (account) { mask |= LLInventoryObserver::CREATE; @@ -3140,7 +3139,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(); @@ -4551,12 +4550,10 @@ 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..ce4ec668f1 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,33 +471,17 @@ 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 { LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater(); 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()); @@ -512,9 +495,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 d28e929b48..92b062a51f 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2054,17 +2054,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& pos = d->mPhysicsShapeMesh.mPositions; diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index d012a9b328..d64f1a36f5 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -2583,8 +2583,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; @@ -2720,10 +2718,7 @@ 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::iterator it = name_list.begin(); it != name_list.end(); ++it) { diff --git a/indra/newview/llsceneview.cpp b/indra/newview/llsceneview.cpp index f7aa63e34d..e250f9bc7a 100644 --- a/indra/newview/llsceneview.cpp +++ b/indra/newview/llsceneview.cpp @@ -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/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 208574f0a3..baca7b6648 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..f3affbeb33 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; @@ -913,9 +910,6 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) 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/llvovolume.cpp b/indra/newview/llvovolume.cpp index f47fb6287c..832803ea6e 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1748,16 +1748,6 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global) } } - bool rigged = false; - - if (!isAnimatedObject()) - { - rigged = isRiggedMesh() && isAttachment(); - } - else - { - rigged = isRiggedMesh() && getControlAvatar() && getControlAvatar()->mPlaying; - } if (any_valid_boxes) { diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 8abb49fba8..aa32ef04b2 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -763,14 +763,13 @@ 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 +777,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 +784,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; } -- cgit v1.3