From 6b81b8629e67d82a7620e48781ded73b6e6126ea Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 5 May 2013 17:45:35 -0700 Subject: Spring cleaning: removed unused .cpp and.h files, and cleaned up header dependencies --- indra/newview/llagentwearables.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e441f21f90..49e754a720 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -39,6 +39,7 @@ #include "llinventoryfunctions.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" +#include "lllocaltextureobject.h" #include "llmd5.h" #include "llnotificationsutil.h" #include "lloutfitobserver.h" -- cgit v1.2.3 From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/newview/llagentwearables.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index e158dc7505..4a25b8c205 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -958,7 +958,7 @@ public: { llinfos << "One item created " << inv_item.asString() << llendl; LLViewerInventoryItem *item = gInventory.getItem(inv_item); - mItemsToLink.put(item); + mItemsToLink.push_back(item); updatePendingWearable(inv_item); } ~OnWearableItemCreatedCB() @@ -1235,7 +1235,7 @@ void LLAgentWearables::removeWearableFinal(const LLWearableType::EType type, boo // Assumes existing wearables are not dirty. void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& items, - const LLDynamicArray< LLViewerWearable* >& wearables, + const std::vector< LLViewerWearable* >& wearables, BOOL remove) { llinfos << "setWearableOutfit() start" << llendl; @@ -1254,8 +1254,8 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it } } - S32 count = wearables.count(); - llassert(items.count() == count); + S32 count = wearables.size(); + llassert(items.size() == count); S32 i; for (i = 0; i < count; i++) @@ -1538,7 +1538,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj std::set requested_item_ids; std::set current_item_ids; - for (S32 i=0; igetLinkedUUID()); // Build up list of objects to be removed and items currently attached. @@ -1624,7 +1624,7 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_array_t& obj_item_array) { // Build a compound message to send all the objects that need to be rezzed. - S32 obj_count = obj_item_array.count(); + S32 obj_count = obj_item_array.size(); // Limit number of packets to send const S32 MAX_PACKETS_TO_SEND = 10; @@ -1655,7 +1655,7 @@ void LLAgentWearables::userAttachMultipleAttachments(LLInventoryModel::item_arra msg->addBOOLFast(_PREHASH_FirstDetachAll, false ); } - const LLInventoryItem* item = obj_item_array.get(i).get(); + const LLInventoryItem* item = obj_item_array.at(i).get(); msg->nextBlockFast(_PREHASH_ObjectData ); msg->addUUIDFast(_PREHASH_ItemID, item->getLinkedUUID()); msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/newview/llagentwearables.cpp | 118 ++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 59 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 4a25b8c205..40a25848a2 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -91,48 +91,48 @@ void checkWearableAgainstInventory(LLViewerWearable *wearable) { if (!item->isWearableType()) { - llwarns << "wearable associated with non-wearable item" << llendl; + LL_WARNS() << "wearable associated with non-wearable item" << LL_ENDL; } if (item->getWearableType() != wearable->getType()) { - llwarns << "type mismatch: wearable " << wearable->getName() + LL_WARNS() << "type mismatch: wearable " << wearable->getName() << " has type " << wearable->getType() << " but inventory item " << item->getName() - << " has type " << item->getWearableType() << llendl; + << " has type " << item->getWearableType() << LL_ENDL; } } else { - llwarns << "wearable inventory item not found" << wearable->getName() - << " itemID " << wearable->getItemID().asString() << llendl; + LL_WARNS() << "wearable inventory item not found" << wearable->getName() + << " itemID " << wearable->getItemID().asString() << LL_ENDL; } } void LLAgentWearables::dump() { - llinfos << "LLAgentWearablesDump" << llendl; + LL_INFOS() << "LLAgentWearablesDump" << LL_ENDL; for (S32 i = 0; i < LLWearableType::WT_COUNT; i++) { U32 count = getWearableCount((LLWearableType::EType)i); - llinfos << "Type: " << i << " count " << count << llendl; + LL_INFOS() << "Type: " << i << " count " << count << LL_ENDL; for (U32 j=0; jgetName() - << " description " << wearable->getDescription() << llendl; + LL_INFOS() << " " << j << " Name " << wearable->getName() + << " description " << wearable->getDescription() << LL_ENDL; } } - llinfos << "Total items awaiting wearable update " << mItemsAwaitingWearableUpdate.size() << llendl; + LL_INFOS() << "Total items awaiting wearable update " << mItemsAwaitingWearableUpdate.size() << LL_ENDL; for (std::set::iterator it = mItemsAwaitingWearableUpdate.begin(); it != mItemsAwaitingWearableUpdate.end(); ++it) { - llinfos << (*it).asString() << llendl; + LL_INFOS() << (*it).asString() << LL_ENDL; } } @@ -141,15 +141,15 @@ struct LLAgentDumper LLAgentDumper(std::string name): mName(name) { - llinfos << llendl; - llinfos << "LLAgentDumper " << mName << llendl; + LL_INFOS() << LL_ENDL; + LL_INFOS() << "LLAgentDumper " << mName << LL_ENDL; gAgentWearables.dump(); } ~LLAgentDumper() { - llinfos << llendl; - llinfos << "~LLAgentDumper " << mName << llendl; + LL_INFOS() << LL_ENDL; + LL_INFOS() << "~LLAgentDumper " << mName << LL_ENDL; gAgentWearables.dump(); } @@ -191,7 +191,7 @@ void LLAgentWearables::setAvatarObject(LLVOAvatarSelf *avatar) // wearables LLAgentWearables::createStandardWearablesAllDoneCallback::~createStandardWearablesAllDoneCallback() { - llinfos << "destructor - all done?" << llendl; + LL_INFOS() << "destructor - all done?" << LL_ENDL; gAgentWearables.createStandardWearablesAllDone(); } @@ -219,14 +219,14 @@ LLAgentWearables::addWearableToAgentInventoryCallback::addWearableToAgentInvento mCB(cb), mDescription(description) { - llinfos << "constructor" << llendl; + LL_INFOS() << "constructor" << LL_ENDL; } void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& inv_item) { if (mTodo & CALL_CREATESTANDARDDONE) { - llinfos << "callback fired, inv_item " << inv_item.asString() << llendl; + LL_INFOS() << "callback fired, inv_item " << inv_item.asString() << LL_ENDL; } if (inv_item.isNull()) @@ -266,7 +266,7 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const LLWearableType::ETy const LLUUID& item_id, LLViewerWearable* wearable) { - llinfos << "type " << type << " index " << index << " item " << item_id.asString() << llendl; + LL_INFOS() << "type " << type << " index " << index << " item " << item_id.asString() << LL_ENDL; if (item_id.isNull()) return; @@ -344,7 +344,7 @@ void LLAgentWearables::sendAgentWearablesUpdate() gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - lldebugs << "sendAgentWearablesUpdate()" << llendl; + LL_DEBUGS() << "sendAgentWearablesUpdate()" << LL_ENDL; // MULTI-WEARABLE: DEPRECATED: HACK: index to 0- server database tables don't support concept of multiwearables. for (S32 type=0; type < LLWearableType::WT_COUNT; ++type) { @@ -356,7 +356,7 @@ void LLAgentWearables::sendAgentWearablesUpdate() LLViewerWearable* wearable = getViewerWearable((LLWearableType::EType)type, 0); if (wearable) { - //llinfos << "Sending wearable " << wearable->getName() << llendl; + //LL_INFOS() << "Sending wearable " << wearable->getName() << LL_ENDL; LLUUID item_id = wearable->getItemID(); const LLViewerInventoryItem *item = gInventory.getItem(item_id); if (item && item->getIsLinkType()) @@ -369,11 +369,11 @@ void LLAgentWearables::sendAgentWearablesUpdate() } else { - //llinfos << "Not wearing wearable type " << LLWearableType::getTypeName((LLWearableType::EType)i) << llendl; + //LL_INFOS() << "Not wearing wearable type " << LLWearableType::getTypeName((LLWearableType::EType)i) << LL_ENDL; gMessageSystem->addUUIDFast(_PREHASH_ItemID, LLUUID::null); } - lldebugs << " " << LLWearableType::getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << llendl; + LL_DEBUGS() << " " << LLWearableType::getTypeLabel((LLWearableType::EType)type) << ": " << (wearable ? wearable->getAssetID() : LLUUID::null) << LL_ENDL; } gAgent.sendReliableMessage(); } @@ -402,7 +402,7 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32 std::string item_name = item->getName(); if (name_changed) { - llinfos << "saveWearable changing name from " << item->getName() << " to " << new_name << llendl; + LL_INFOS() << "saveWearable changing name from " << item->getName() << " to " << new_name << LL_ENDL; item_name = new_name; } // Update existing inventory item @@ -462,20 +462,20 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type, { if (!isWearableCopyable(type, index)) { - llwarns << "LLAgent::saveWearableAs() not copyable." << llendl; + LL_WARNS() << "LLAgent::saveWearableAs() not copyable." << LL_ENDL; return; } LLViewerWearable* old_wearable = getViewerWearable(type, index); if (!old_wearable) { - llwarns << "LLAgent::saveWearableAs() no old wearable." << llendl; + LL_WARNS() << "LLAgent::saveWearableAs() no old wearable." << LL_ENDL; return; } LLInventoryItem* item = gInventory.getItem(getWearableItemID(type,index)); if (!item) { - llwarns << "LLAgent::saveWearableAs() no inventory item." << llendl; + LL_WARNS() << "LLAgent::saveWearableAs() no inventory item." << LL_ENDL; return; } std::string trunc_name(new_name); @@ -742,7 +742,7 @@ void LLAgentWearables::wearableUpdated(LLWearable *wearable, BOOL removed) { wearable->setDefinitionVersion(22); U32 index = getWearableIndex(wearable); - llinfos << "forcing wearable type " << wearable->getType() << " to version 22 from 24" << llendl; + LL_INFOS() << "forcing wearable type " << wearable->getType() << " to version 22 from 24" << LL_ENDL; saveWearable(wearable->getType(),index,TRUE); } @@ -831,7 +831,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(current_outfit_id); - //lldebugs << "processAgentInitialWearablesUpdate()" << llendl; + //LL_DEBUGS() << "processAgentInitialWearablesUpdate()" << LL_ENDL; // Add wearables // MULTI-WEARABLE: DEPRECATED: Message only supports one wearable per type, will be ignored in future. gAgentWearables.mItemsAwaitingWearableUpdate.clear(); @@ -870,7 +870,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs outfit->add(wearable_data); } - lldebugs << " " << LLWearableType::getTypeLabel(type) << llendl; + LL_DEBUGS() << " " << LLWearableType::getTypeLabel(type) << LL_ENDL; } // Get the complete information on the items in the inventory and set up an observer @@ -898,7 +898,7 @@ void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type, { // Try to recover by replacing missing wearable with a new one. LLNotificationsUtil::add("ReplacedMissingWearable"); - lldebugs << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << llendl; + LL_DEBUGS() << "Wearable " << LLWearableType::getTypeLabel(type) << " could not be downloaded. Replaced inventory item with default wearable." << LL_ENDL; LLViewerWearable* new_wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp); setWearable(type,index,new_wearable); @@ -939,7 +939,7 @@ void LLAgentWearables::addLocalTextureObject(const LLWearableType::EType wearabl LLViewerWearable* wearable = getViewerWearable((LLWearableType::EType)wearable_type, wearable_index); if (!wearable) { - llerrs << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << llendl; + LL_ERRS() << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << LL_ENDL; return; } LLLocalTextureObject lto; @@ -952,18 +952,18 @@ public: OnWearableItemCreatedCB(): mWearablesAwaitingItems(LLWearableType::WT_COUNT,NULL) { - llinfos << "created callback" << llendl; + LL_INFOS() << "created callback" << LL_ENDL; } /* virtual */ void fire(const LLUUID& inv_item) { - llinfos << "One item created " << inv_item.asString() << llendl; + LL_INFOS() << "One item created " << inv_item.asString() << LL_ENDL; LLViewerInventoryItem *item = gInventory.getItem(inv_item); mItemsToLink.push_back(item); updatePendingWearable(inv_item); } ~OnWearableItemCreatedCB() { - llinfos << "All items created" << llendl; + LL_INFOS() << "All items created" << LL_ENDL; LLPointer link_waiter = new LLUpdateAppearanceOnDestroy; LLAppearanceMgr::instance().linkAll(LLAppearanceMgr::instance().getCOF(), mItemsToLink, @@ -973,7 +973,7 @@ public: { if (!wearable) { - llwarns << "no wearable" << llendl; + LL_WARNS() << "no wearable" << LL_ENDL; return; } LLWearableType::EType type = wearable->getType(); @@ -983,7 +983,7 @@ public: } else { - llwarns << "invalid type " << type << llendl; + LL_WARNS() << "invalid type " << type << LL_ENDL; } } void updatePendingWearable(const LLUUID& inv_item) @@ -991,12 +991,12 @@ public: LLViewerInventoryItem *item = gInventory.getItem(inv_item); if (!item) { - llwarns << "no item found" << llendl; + LL_WARNS() << "no item found" << LL_ENDL; return; } if (!item->isWearableType()) { - llwarns << "non-wearable item found" << llendl; + LL_WARNS() << "non-wearable item found" << LL_ENDL; return; } if (item && item->isWearableType()) @@ -1010,7 +1010,7 @@ public: } else { - llwarns << "invalid wearable type " << type << llendl; + LL_WARNS() << "invalid wearable type " << type << LL_ENDL; } } } @@ -1022,7 +1022,7 @@ private: void LLAgentWearables::createStandardWearables() { - llwarns << "Creating standard wearables" << llendl; + LL_WARNS() << "Creating standard wearables" << LL_ENDL; if (!isAgentAvatarValid()) return; @@ -1070,7 +1070,7 @@ void LLAgentWearables::createStandardWearables() void LLAgentWearables::createStandardWearablesDone(S32 type, U32 index) { - llinfos << "type " << type << " index " << index << llendl; + LL_INFOS() << "type " << type << " index " << index << LL_ENDL; if (!isAgentAvatarValid()) return; gAgentAvatarp->updateVisualParams(); @@ -1080,7 +1080,7 @@ void LLAgentWearables::createStandardWearablesAllDone() { // ... because sendAgentWearablesUpdate will notify inventory // observers. - llinfos << "all done?" << llendl; + LL_INFOS() << "all done?" << LL_ENDL; mWearablesLoaded = TRUE; checkWearablesLoaded(); @@ -1238,7 +1238,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it const std::vector< LLViewerWearable* >& wearables, BOOL remove) { - llinfos << "setWearableOutfit() start" << llendl; + LL_INFOS() << "setWearableOutfit() start" << LL_ENDL; // TODO: Removed check for ensuring that teens don't remove undershirt and underwear. Handle later if (remove) @@ -1312,7 +1312,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it gAgentAvatarp->dumpAvatarTEs("setWearableOutfit"); - lldebugs << "setWearableOutfit() end" << llendl; + LL_DEBUGS() << "setWearableOutfit() end" << LL_ENDL; } @@ -1322,7 +1322,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLViewerWearab //LLAgentDumper dumper("setWearableItem"); if (isWearingItem(new_item->getUUID())) { - llwarns << "wearable " << new_item->getUUID() << " is already worn" << llendl; + LL_WARNS() << "wearable " << new_item->getUUID() << " is already worn" << LL_ENDL; return; } @@ -1339,7 +1339,7 @@ void LLAgentWearables::setWearableItem(LLInventoryItem* new_item, LLViewerWearab if ((old_wearable->getAssetID() == new_wearable->getAssetID()) && (old_item_id == new_item->getUUID())) { - lldebugs << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << llendl; + LL_DEBUGS() << "No change to wearable asset and item: " << LLWearableType::getTypeName(type) << LL_ENDL; return; } @@ -1403,8 +1403,8 @@ void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLViewerWeara new_wearable->setItemID(new_item->getUUID()); const bool trigger_updated = false; pushWearable(type, new_wearable, trigger_updated); - llinfos << "Added additional wearable for type " << type - << " size is now " << getWearableCount(type) << llendl; + LL_INFOS() << "Added additional wearable for type " << type + << " size is now " << getWearableCount(type) << LL_ENDL; checkWearableAgainstInventory(new_wearable); } else @@ -1426,11 +1426,11 @@ void LLAgentWearables::setWearableFinal(LLInventoryItem* new_item, LLViewerWeara gInventory.addChangedMask(LLInventoryObserver::LABEL, old_item_id); gInventory.notifyObservers(); } - llinfos << "Replaced current element 0 for type " << type - << " size is now " << getWearableCount(type) << llendl; + LL_INFOS() << "Replaced current element 0 for type " << type + << " size is now " << getWearableCount(type) << LL_ENDL; } - //llinfos << "LLVOAvatar::setWearableItem()" << llendl; + //LL_INFOS() << "LLVOAvatar::setWearableItem()" << LL_ENDL; queryWearableCache(); //new_wearable->writeToAvatar(TRUE); @@ -1470,7 +1470,7 @@ void LLAgentWearables::queryWearableCache() ETextureIndex te_index = LLAvatarAppearanceDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index); - //llinfos << "Requesting texture for hash " << hash << " in baked texture slot " << baked_index << llendl; + //LL_INFOS() << "Requesting texture for hash " << hash << " in baked texture slot " << baked_index << LL_ENDL; gMessageSystem->nextBlockFast(_PREHASH_WearableData); gMessageSystem->addUUIDFast(_PREHASH_ID, hash_id); gMessageSystem->addU8Fast(_PREHASH_TextureIndex, (U8)te_index); @@ -1589,7 +1589,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj } // S32 remove_count = objects_to_remove.size(); // S32 add_count = items_to_add.size(); - // llinfos << "remove " << remove_count << " add " << add_count << llendl; + // LL_INFOS() << "remove " << remove_count << " add " << add_count << LL_ENDL; // Remove everything in objects_to_remove userRemoveMultipleAttachments(objects_to_remove); @@ -1816,20 +1816,20 @@ void LLAgentWearables::editWearable(const LLUUID& item_id) LLViewerInventoryItem* item = gInventory.getLinkedItem(item_id); if (!item) { - llwarns << "Failed to get linked item" << llendl; + LL_WARNS() << "Failed to get linked item" << LL_ENDL; return; } LLViewerWearable* wearable = gAgentWearables.getWearableFromItemID(item_id); if (!wearable) { - llwarns << "Cannot get wearable" << llendl; + LL_WARNS() << "Cannot get wearable" << LL_ENDL; return; } if (!gAgentWearables.isWearableModifiable(item->getUUID())) { - llwarns << "Cannot modify wearable" << llendl; + LL_WARNS() << "Cannot modify wearable" << LL_ENDL; return; } @@ -1863,7 +1863,7 @@ void LLAgentWearables::updateServer() void LLAgentWearables::populateMyOutfitsFolder(void) { - llinfos << "starting outfit population" << llendl; + LL_INFOS() << "starting outfit population" << LL_ENDL; const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(my_outfits_id); -- cgit v1.2.3