diff options
author | Merov Linden <merov@lindenlab.com> | 2014-05-06 18:21:04 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-05-06 18:21:04 -0700 |
commit | 8dae4bc222d1b0744254442ab0b26538285341de (patch) | |
tree | 88da67f01f0dc32457b4a5085d5e699ea55715a4 /indra/newview/llappearancemgr.cpp | |
parent | f6bb6a0f935323434a3f3d0d94e94c8d8238effe (diff) | |
parent | d0ef02c23a7a37c8c9bfe3a86bae88bb811fc9fe (diff) |
Pull merge from lindenlab/viewer-release. Fixed some conflicts and compile errors
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 351 |
1 files changed, 176 insertions, 175 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index da1609297e..81f713502f 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -148,16 +148,16 @@ LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string item_array, LLInventoryModel::EXCLUDE_TRASH, has_name); - if (0 == cat_array.count()) + if (0 == cat_array.size()) return LLUUID(); else { - LLViewerInventoryCategory *cat = cat_array.get(0); + LLViewerInventoryCategory *cat = cat_array.at(0); if (cat) return cat->getUUID(); else { - llwarns << "null cat" << llendl; + LL_WARNS() << "null cat" << LL_ENDL; return LLUUID(); } } @@ -216,11 +216,11 @@ public: // Request or re-request operation for specified item. void addItem(const LLUUID& item_id) { - LL_DEBUGS("Avatar") << "item_id " << item_id << llendl; + LL_DEBUGS("Avatar") << "item_id " << item_id << LL_ENDL; if (!requestOperation(item_id)) { - LL_DEBUGS("Avatar") << "item_id " << item_id << " requestOperation false, skipping" << llendl; + LL_DEBUGS("Avatar") << "item_id " << item_id << " requestOperation false, skipping" << LL_ENDL; return; } @@ -243,20 +243,20 @@ public: { if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateLateOpRate")) { - llwarns << "Simulating late operation by punting handling to later" << llendl; + LL_WARNS() << "Simulating late operation by punting handling to later" << LL_ENDL; doAfterInterval(boost::bind(&LLCallAfterInventoryBatchMgr::onOp,this,src_id,dst_id,timestamp), mRetryAfter); return; } mPendingRequests--; F32 elapsed = timestamp.getElapsedTimeF32(); - LL_DEBUGS("Avatar") << "op done, src_id " << src_id << " dst_id " << dst_id << " after " << elapsed << " seconds" << llendl; + LL_DEBUGS("Avatar") << "op done, src_id " << src_id << " dst_id " << dst_id << " after " << elapsed << " seconds" << LL_ENDL; if (mWaitTimes.find(src_id) == mWaitTimes.end()) { // No longer waiting for this item - either serviced // already or gave up after too many retries. - llwarns << "duplicate or late operation, src_id " << src_id << "dst_id " << dst_id - << " elapsed " << elapsed << " after end " << (S32) mCompletionOrFailureCalled << llendl; + LL_WARNS() << "duplicate or late operation, src_id " << src_id << "dst_id " << dst_id + << " elapsed " << elapsed << " after end " << (S32) mCompletionOrFailureCalled << LL_ENDL; } mTimeStats.push(elapsed); mWaitTimes.erase(src_id); @@ -291,13 +291,13 @@ public: void onFailure() { - llinfos << "failed" << llendl; + LL_INFOS() << "failed" << LL_ENDL; mOnFailureFunc(); } void onCompletion() { - llinfos << "done" << llendl; + LL_INFOS() << "done" << LL_ENDL; mOnCompletionFunc(); } @@ -316,7 +316,7 @@ public: if (!mWaitTimes.empty()) { - llwarns << "still waiting on " << mWaitTimes.size() << " items" << llendl; + LL_WARNS() << "still waiting on " << mWaitTimes.size() << " items" << LL_ENDL; for (std::map<LLUUID,LLTimer>::iterator it = mWaitTimes.begin(); it != mWaitTimes.end();) { @@ -331,13 +331,13 @@ public: if (retries < mMaxRetries) { LL_DEBUGS("Avatar") << "Waited " << time_waited << - " for " << curr_it->first << ", retrying" << llendl; + " for " << curr_it->first << ", retrying" << LL_ENDL; mRetryCount++; addItem(curr_it->first); } else { - llwarns << "Giving up on " << curr_it->first << " after too many retries" << llendl; + LL_WARNS() << "Giving up on " << curr_it->first << " after too many retries" << LL_ENDL; mWaitTimes.erase(curr_it); mFailCount++; } @@ -354,16 +354,16 @@ public: void reportStats() { - LL_DEBUGS("Avatar") << "Phase: " << mTrackingPhase << llendl; - LL_DEBUGS("Avatar") << "mFailCount: " << mFailCount << llendl; - LL_DEBUGS("Avatar") << "mRetryCount: " << mRetryCount << llendl; - LL_DEBUGS("Avatar") << "Times: n " << mTimeStats.getCount() << " min " << mTimeStats.getMinValue() << " max " << mTimeStats.getMaxValue() << llendl; - LL_DEBUGS("Avatar") << "Mean " << mTimeStats.getMean() << " stddev " << mTimeStats.getStdDev() << llendl; + LL_DEBUGS("Avatar") << "Phase: " << mTrackingPhase << LL_ENDL; + LL_DEBUGS("Avatar") << "mFailCount: " << mFailCount << LL_ENDL; + LL_DEBUGS("Avatar") << "mRetryCount: " << mRetryCount << LL_ENDL; + LL_DEBUGS("Avatar") << "Times: n " << mTimeStats.getCount() << " min " << mTimeStats.getMinValue() << " max " << mTimeStats.getMaxValue() << LL_ENDL; + LL_DEBUGS("Avatar") << "Mean " << mTimeStats.getMean() << " stddev " << mTimeStats.getStdDev() << LL_ENDL; } virtual ~LLCallAfterInventoryBatchMgr() { - LL_DEBUGS("Avatar") << "deleting" << llendl; + LL_DEBUGS("Avatar") << "deleting" << LL_ENDL; } protected: @@ -402,10 +402,10 @@ public: { LLViewerInventoryItem *item = gInventory.getItem(item_id); llassert(item); - LL_DEBUGS("Avatar") << "copying item " << item_id << llendl; + LL_DEBUGS("Avatar") << "copying item " << item_id << LL_ENDL; if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate")) { - LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl; + LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << LL_ENDL; return true; } copy_inventory_item( @@ -444,14 +444,14 @@ public: { if (item->getParentUUID() == mDstCatID) { - LL_DEBUGS("Avatar") << "item " << item_id << " name " << item->getName() << " is already a child of " << mDstCatID << llendl; + LL_DEBUGS("Avatar") << "item " << item_id << " name " << item->getName() << " is already a child of " << mDstCatID << LL_ENDL; return false; } - LL_DEBUGS("Avatar") << "linking item " << item_id << " name " << item->getName() << " to " << mDstCatID << llendl; + LL_DEBUGS("Avatar") << "linking item " << item_id << " name " << item->getName() << " to " << mDstCatID << LL_ENDL; // create an inventory item link. if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate")) { - LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl; + LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << LL_ENDL; return true; } link_inventory_item(gAgent.getID(), @@ -470,7 +470,7 @@ public: LLViewerInventoryCategory *catp = gInventory.getCategory(item_id); if (!catp) { - llwarns << "link request failed, id not found as inventory item or category " << item_id << llendl; + LL_WARNS() << "link request failed, id not found as inventory item or category " << item_id << LL_ENDL; return false; } const LLUUID cof = LLAppearanceMgr::instance().getCOF(); @@ -482,10 +482,10 @@ public: { if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate")) { - LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl; + LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << LL_ENDL; return true; } - LL_DEBUGS("Avatar") << "linking folder " << item_id << " name " << catp->getName() << " to cof " << cof << llendl; + LL_DEBUGS("Avatar") << "linking folder " << item_id << " name " << catp->getName() << " to cof " << cof << LL_ENDL; link_inventory_item(gAgent.getID(), item_id, cof, catp->getName(), "", LLAssetType::AT_LINK_FOLDER, new LLBoostFuncInventoryCallback( @@ -621,11 +621,11 @@ LLWearableHoldingPattern::LLWearableHoldingPattern(): { if (sActiveHoldingPatterns.size()>0) { - llinfos << "Creating LLWearableHoldingPattern when " + LL_INFOS() << "Creating LLWearableHoldingPattern when " << sActiveHoldingPatterns.size() << " other attempts are active." << " Flagging others as invalid." - << llendl; + << LL_ENDL; for (type_set_hp::iterator it = sActiveHoldingPatterns.begin(); it != sActiveHoldingPatterns.end(); ++it) @@ -692,7 +692,7 @@ void LLWearableHoldingPattern::checkMissingWearables() if (!isMostRecent()) { // runway why don't we actually skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } std::vector<S32> found_by_type(LLWearableType::WT_COUNT,0); @@ -710,7 +710,7 @@ void LLWearableHoldingPattern::checkMissingWearables() { if (requested_by_type[type] > found_by_type[type]) { - llwarns << self_av_string() << "got fewer wearables than requested, type " << type << ": requested " << requested_by_type[type] << ", found " << found_by_type[type] << llendl; + LL_WARNS() << self_av_string() << "got fewer wearables than requested, type " << type << ": requested " << requested_by_type[type] << ", found " << found_by_type[type] << LL_ENDL; } if (found_by_type[type] > 0) continue; @@ -727,7 +727,7 @@ void LLWearableHoldingPattern::checkMissingWearables() mTypesToRecover.insert(type); mTypesToLink.insert(type); recoverMissingWearable((LLWearableType::EType)type); - llwarns << self_av_string() << "need to replace " << type << llendl; + LL_WARNS() << self_av_string() << "need to replace " << type << LL_ENDL; } } @@ -750,13 +750,13 @@ void LLWearableHoldingPattern::onAllComplete() if (!isMostRecent()) { // runway need to skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } // Activate all gestures in this folder - if (mGestItems.count() > 0) + if (mGestItems.size() > 0) { - LL_DEBUGS("Avatar") << self_av_string() << "Activating " << mGestItems.count() << " gestures" << LL_ENDL; + LL_DEBUGS("Avatar") << self_av_string() << "Activating " << mGestItems.size() << " gestures" << LL_ENDL; LLGestureMgr::instance().activateGestures(mGestItems); @@ -779,7 +779,7 @@ void LLWearableHoldingPattern::onAllComplete() // Update attachments to match those requested. if (isAgentAvatarValid()) { - LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.count() << " attachments" << LL_ENDL; + LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL; LLAgentWearables::userUpdateAttachments(mObjItems); } @@ -802,7 +802,7 @@ void LLWearableHoldingPattern::onFetchCompletion() if (!isMostRecent()) { // runway skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } checkMissingWearables(); @@ -814,7 +814,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() if (!isMostRecent()) { // runway skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } bool completed = isFetchCompleted(); @@ -830,7 +830,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion() if (timed_out) { - llwarns << self_av_string() << "Exceeded max wait time for wearables, updating appearance based on what has arrived" << llendl; + LL_WARNS() << self_av_string() << "Exceeded max wait time for wearables, updating appearance based on what has arrived" << LL_ENDL; } onFetchCompletion(); @@ -842,11 +842,11 @@ void recovered_item_link_cb(const LLUUID& item_id, LLWearableType::EType type, L { if (!holder->isMostRecent()) { - llwarns << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; // runway skip here? } - llinfos << "Recovered item link for type " << type << llendl; + LL_INFOS() << "Recovered item link for type " << type << LL_ENDL; holder->eraseTypeToLink(type); // Add wearable to FoundData for actual wearing LLViewerInventoryItem *item = gInventory.getItem(item_id); @@ -870,12 +870,12 @@ void recovered_item_link_cb(const LLUUID& item_id, LLWearableType::EType type, L } else { - llwarns << self_av_string() << "inventory item not found for recovered wearable" << llendl; + LL_WARNS() << self_av_string() << "inventory item not found for recovered wearable" << LL_ENDL; } } else { - llwarns << self_av_string() << "inventory link not found for recovered wearable" << llendl; + LL_WARNS() << self_av_string() << "inventory link not found for recovered wearable" << LL_ENDL; } } @@ -884,7 +884,7 @@ void recovered_item_cb(const LLUUID& item_id, LLWearableType::EType type, LLView if (!holder->isMostRecent()) { // runway skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } LL_DEBUGS("Avatar") << self_av_string() << "Recovered item for type " << type << LL_ENDL; @@ -910,13 +910,13 @@ void LLWearableHoldingPattern::recoverMissingWearable(LLWearableType::EType type if (!isMostRecent()) { // runway skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } // 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* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp); // Add a new one in the lost and found folder. @@ -960,7 +960,7 @@ bool LLWearableHoldingPattern::pollMissingWearables() if (!isMostRecent()) { // runway skip here? - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } bool timed_out = isTimedOut(); @@ -1009,11 +1009,11 @@ void LLWearableHoldingPattern::handleLateArrivals() } if (!isMostRecent()) { - llwarns << self_av_string() << "Late arrivals not handled - outfit change no longer valid" << llendl; + LL_WARNS() << self_av_string() << "Late arrivals not handled - outfit change no longer valid" << LL_ENDL; } if (!mIsAllComplete) { - llwarns << self_av_string() << "Late arrivals not handled - in middle of missing wearables processing" << llendl; + LL_WARNS() << self_av_string() << "Late arrivals not handled - in middle of missing wearables processing" << LL_ENDL; } LL_INFOS("Avatar") << self_av_string() << "Need to handle " << mLateArrivals.size() << " late arriving wearables" << LL_ENDL; @@ -1092,19 +1092,19 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable) { if (!isMostRecent()) { - llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl; + LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; } mResolved += 1; // just counting callbacks, not successes. LL_DEBUGS("Avatar") << self_av_string() << "resolved " << mResolved << "/" << getFoundList().size() << LL_ENDL; if (!wearable) { - llwarns << self_av_string() << "no wearable found" << llendl; + LL_WARNS() << self_av_string() << "no wearable found" << LL_ENDL; } if (mFired) { - llwarns << self_av_string() << "called after holder fired" << llendl; + LL_WARNS() << self_av_string() << "called after holder fired" << LL_ENDL; if (wearable) { mLateArrivals.insert(wearable); @@ -1130,7 +1130,7 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLViewerWearable *wearable) // Failing this means inventory or asset server are corrupted in a way we don't handle. if ((data.mWearableType >= LLWearableType::WT_COUNT) || (wearable->getType() != data.mWearableType)) { - llwarns << self_av_string() << "recovered wearable but type invalid. inventory wearable type: " << data.mWearableType << " asset wearable type: " << wearable->getType() << llendl; + LL_WARNS() << self_av_string() << "recovered wearable but type invalid. inventory wearable type: " << data.mWearableType << " asset wearable type: " << wearable->getType() << LL_ENDL; break; } @@ -1155,9 +1155,9 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items) // encountered, so we actually keep the *last* of each duplicate // item. This is needed to give the right priority when adding // duplicate items to an existing outfit. - for (S32 i=items.count()-1; i>=0; i--) + for (S32 i=items.size()-1; i>=0; i--) { - LLViewerInventoryItem *item = items.get(i); + LLViewerInventoryItem *item = items.at(i); LLUUID item_id = item->getLinkedUUID(); if (items_seen.find(item_id)!=items_seen.end()) continue; @@ -1168,7 +1168,7 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items) it != tmp_list.end(); ++it) { - new_items.put(*it); + new_items.push_back(*it); } items = new_items; } @@ -1251,7 +1251,7 @@ const LLUUID LLAppearanceMgr::getBaseOutfitUUID() if (outfit_cat->getPreferredType() != LLFolderType::FT_OUTFIT) { - llwarns << "Expected outfit type:" << LLFolderType::FT_OUTFIT << " but got type:" << outfit_cat->getType() << " for folder name:" << outfit_cat->getName() << llendl; + LL_WARNS() << "Expected outfit type:" << LLFolderType::FT_OUTFIT << " but got type:" << outfit_cat->getType() << " for folder name:" << outfit_cat->getName() << LL_ENDL; return LLUUID::null; } @@ -1440,10 +1440,10 @@ void LLAppearanceMgr::shallowCopyCategory(const LLUUID& src_id, const LLUUID& ds LLInventoryCategory *src_cat = gInventory.getCategory(src_id); if (!src_cat) { - llwarns << "folder not found for src " << src_id.asString() << llendl; + LL_WARNS() << "folder not found for src " << src_id.asString() << LL_ENDL; return; } - llinfos << "starting, src_id " << src_id << " name " << src_cat->getName() << " dst_id " << dst_id << llendl; + LL_INFOS() << "starting, src_id " << src_id << " name " << src_cat->getName() << " dst_id " << dst_id << LL_ENDL; LLUUID parent_id = dst_id; if(parent_id.isNull()) { @@ -1464,7 +1464,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL LLInventoryModel::cat_array_t* cats; LLInventoryModel::item_array_t* items; gInventory.getDirectDescendentsOf(src_id, cats, items); - llinfos << "copying " << items->count() << " items" << llendl; + LL_INFOS() << "copying " << items->size() << " items" << LL_ENDL; for (LLInventoryModel::item_array_t::const_iterator iter = items->begin(); iter != items->end(); ++iter) @@ -1504,7 +1504,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL case LLAssetType::AT_BODYPART: case LLAssetType::AT_GESTURE: { - llinfos << "copying inventory item " << item->getName() << llendl; + LL_INFOS() << "copying inventory item " << item->getName() << LL_ENDL; copy_inventory_item(gAgent.getID(), item->getPermissions().getOwner(), item->getUUID(), @@ -1644,9 +1644,9 @@ void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category) LLInventoryModel::item_array_t items; gInventory.collectDescendents(category, cats, items, LLInventoryModel::EXCLUDE_TRASH); - for (S32 i = 0; i < items.count(); ++i) + for (S32 i = 0; i < items.size(); ++i) { - LLViewerInventoryItem *item = items.get(i); + LLViewerInventoryItem *item = items.at(i); if (item->getActualType() != LLAssetType::AT_LINK_FOLDER) continue; if (item->getIsLinkType()) @@ -1666,9 +1666,9 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin LLInventoryModel::item_array_t items; gInventory.collectDescendents(category, cats, items, LLInventoryModel::EXCLUDE_TRASH); - for (S32 i = 0; i < items.count(); ++i) + for (S32 i = 0; i < items.size(); ++i) { - LLViewerInventoryItem *item = items.get(i); + LLViewerInventoryItem *item = items.at(i); if (keep_outfit_links && (item->getActualType() == LLAssetType::AT_LINK_FOLDER)) continue; if (item->getIsLinkType()) @@ -1676,7 +1676,7 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin #if 0 if (keep_items && keep_items->find(item) != LLInventoryModel::item_array_t::FAIL) { - llinfos << "preserved item" << llendl; + LL_INFOS() << "preserved item" << LL_ENDL; } else { @@ -1718,9 +1718,9 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid, LLInventoryModel::item_array_t& items, LLPointer<LLInventoryCallback> cb) { - for (S32 i=0; i<items.count(); i++) + for (S32 i=0; i<items.size(); i++) { - const LLInventoryItem* item = items.get(i).get(); + const LLInventoryItem* item = items.at(i).get(); link_inventory_item(gAgent.getID(), item->getLinkedUUID(), cat_uuid, @@ -1749,9 +1749,9 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) { LLInventoryModel::item_array_t gest_items; getDescendentsOfAssetType(cof, gest_items, LLAssetType::AT_GESTURE, false); - for(S32 i = 0; i < gest_items.count(); ++i) + for(S32 i = 0; i < gest_items.size(); ++i) { - LLViewerInventoryItem *gest_item = gest_items.get(i); + LLViewerInventoryItem *gest_item = gest_items.at(i); if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) ) { LLGestureMgr::instance().deactivateGesture( gest_item->getLinkedUUID() ); @@ -1798,10 +1798,10 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) // Create links to new COF contents. LLInventoryModel::item_array_t all_items; - all_items += body_items; - all_items += wear_items; - all_items += obj_items; - all_items += gest_items; + std::copy(body_items.begin(), body_items.end(), std::back_inserter(all_items)); + std::copy(wear_items.begin(), wear_items.end(), std::back_inserter(all_items)); + std::copy(obj_items.begin(), obj_items.end(), std::back_inserter(all_items)); + std::copy(gest_items.begin(), gest_items.end(), std::back_inserter(all_items)); // Will link all the above items. LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; @@ -1854,9 +1854,10 @@ void LLAppearanceMgr::createBaseOutfitLink(const LLUUID& category, LLPointer<LLI void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, bool append) { - lldebugs << "updateAgentWearables()" << llendl; + LL_DEBUGS() << "updateAgentWearables()" << LL_ENDL; LLInventoryItem::item_array_t items; - LLDynamicArray< LLViewerWearable* > wearables; + std::vector< LLViewerWearable* > wearables; + wearables.reserve(32); // For each wearable type, find the wearables of that type. for( S32 i = 0; i < LLWearableType::WT_COUNT; i++ ) @@ -1871,14 +1872,14 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo LLViewerInventoryItem* item = (LLViewerInventoryItem*)gInventory.getItem(data.mItemID); if( item && (item->getAssetUUID() == wearable->getAssetID()) ) { - items.put(item); - wearables.put(wearable); + items.push_back(item); + wearables.push_back(wearable); } } } } - if(wearables.count() > 0) + if(wearables.size() > 0) { gAgentWearables.setWearableOutfit(items, wearables, !append); } @@ -1905,7 +1906,7 @@ bool sort_by_actual_description(const LLInventoryItem* item1, const LLInventoryI { if (!item1 || !item2) { - llwarning("either item1 or item2 is NULL", 0); + LL_WARNS() << "either item1 or item2 is NULL" << LL_ENDL; return true; } @@ -1922,7 +1923,7 @@ void item_array_diff(LLInventoryModel::item_array_t& full_list, ++it) { LLViewerInventoryItem *item = *it; - if (keep_list.find(item) < 0) // Why on earth does LLDynamicArray need to redefine find()? + if (std::find(keep_list.begin(), keep_list.end(), item) == keep_list.end()) { kill_list.push_back(item); } @@ -1987,7 +1988,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) { if (mIsInUpdateAppearanceFromCOF) { - llwarns << "Called updateAppearanceFromCOF inside updateAppearanceFromCOF, skipping" << llendl; + LL_WARNS() << "Called updateAppearanceFromCOF inside updateAppearanceFromCOF, skipping" << LL_ENDL; return; } @@ -2023,7 +2024,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) LLUUID current_outfit_id = getCOF(); // Find all the wearables that are in the COF's subtree. - lldebugs << "LLAppearanceMgr::updateFromCOF()" << llendl; + LL_DEBUGS() << "LLAppearanceMgr::updateFromCOF()" << LL_ENDL; LLInventoryModel::item_array_t wear_items; LLInventoryModel::item_array_t obj_items; LLInventoryModel::item_array_t gest_items; @@ -2036,7 +2037,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) dumpItemArray(wear_items,"asset_dump: wear_item"); dumpItemArray(obj_items,"asset_dump: obj_item"); - if(!wear_items.count()) + if(!wear_items.size()) { LLNotificationsUtil::add("CouldNotPutOnOutfit"); return; @@ -2056,9 +2057,9 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) // callback will be called (and this object deleted) // before the final getNextData(). - for(S32 i = 0; i < wear_items.count(); ++i) + for(S32 i = 0; i < wear_items.size(); ++i) { - LLViewerInventoryItem *item = wear_items.get(i); + LLViewerInventoryItem *item = wear_items.at(i); LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL; // Fault injection: use debug setting to test asset @@ -2086,11 +2087,11 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) { if (!item) { - llwarns << "Attempt to wear a null item " << llendl; + LL_WARNS() << "Attempt to wear a null item " << LL_ENDL; } else if (!linked_item) { - llwarns << "Attempt to wear a broken link [ name:" << item->getName() << " ] " << llendl; + LL_WARNS() << "Attempt to wear a broken link [ name:" << item->getName() << " ] " << LL_ENDL; } } } @@ -2102,7 +2103,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) { LLFoundData& found = *it; - lldebugs << self_av_string() << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << llendl; + LL_DEBUGS() << self_av_string() << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << LL_ENDL; // Fetch the wearables about to be worn. LLWearableList::instance().getAsset(found.mAssetID, @@ -2301,10 +2302,10 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name) has_name); bool copy_items = false; LLInventoryCategory* cat = NULL; - if (cat_array.count() > 0) + if (cat_array.size() > 0) { // Just wear the first one that matches - cat = cat_array.get(0); + cat = cat_array.at(0); } else { @@ -2313,9 +2314,9 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name) item_array, LLInventoryModel::EXCLUDE_TRASH, has_name); - if(cat_array.count() > 0) + if(cat_array.size() > 0) { - cat = cat_array.get(0); + cat = cat_array.at(0); copy_items = true; } } @@ -2326,8 +2327,8 @@ void LLAppearanceMgr::wearOutfitByName(const std::string& name) } else { - llwarns << "Couldn't find outfit " <<name<< " in wearOutfitByName()" - << llendl; + LL_WARNS() << "Couldn't find outfit " <<name<< " in wearOutfitByName()" + << LL_ENDL; } } @@ -2412,7 +2413,7 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update const LLViewerInventoryItem *vitem = dynamic_cast<const LLViewerInventoryItem*>(item); if (!vitem) { - llwarns << "not an llviewerinventoryitem, failed" << llendl; + LL_WARNS() << "not an llviewerinventoryitem, failed" << LL_ENDL; return; } @@ -2426,10 +2427,10 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update LLInventoryModel::EXCLUDE_TRASH); bool linked_already = false; U32 count = 0; - for (S32 i=0; i<item_array.count(); i++) + for (S32 i=0; i<item_array.size(); i++) { // Are these links to the same object? - const LLViewerInventoryItem* inv_item = item_array.get(i).get(); + const LLViewerInventoryItem* inv_item = item_array.at(i).get(); const LLWearableType::EType wearable_type = inv_item->getWearableType(); const bool is_body_part = (wearable_type == LLWearableType::WT_SHAPE) @@ -2502,12 +2503,12 @@ LLInventoryModel::item_array_t LLAppearanceMgr::findCOFItemLinks(const LLUUID& i cat_array, item_array, LLInventoryModel::EXCLUDE_TRASH); - for (S32 i=0; i<item_array.count(); i++) + for (S32 i=0; i<item_array.size(); i++) { - const LLViewerInventoryItem* inv_item = item_array.get(i).get(); + const LLViewerInventoryItem* inv_item = item_array.at(i).get(); if (inv_item->getLinkedUUID() == vitem->getLinkedUUID()) { - result.put(item_array.get(i)); + result.push_back(item_array.at(i)); } } } @@ -2579,9 +2580,9 @@ void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id) cat_array, item_array, LLInventoryModel::EXCLUDE_TRASH); - for (S32 i=0; i<item_array.count(); i++) + for (S32 i=0; i<item_array.size(); i++) { - const LLInventoryItem* item = item_array.get(i).get(); + const LLInventoryItem* item = item_array.at(i).get(); if (item->getIsLinkType() && item->getLinkedUUID() == item_id) { gInventory.purgeObject(item->getUUID()); @@ -2611,7 +2612,7 @@ bool sort_by_linked_uuid(const LLViewerInventoryItem* item1, const LLViewerInven { if (!item1 || !item2) { - llwarning("item1, item2 cannot be null, something is very wrong", 0); + LL_WARNS() << "item1, item2 cannot be null, something is very wrong" << LL_ENDL; return true; } @@ -2653,7 +2654,7 @@ void LLAppearanceMgr::updateIsDirty() gInventory.collectDescendentsIf(base_outfit, outfit_cats, outfit_items, LLInventoryModel::EXCLUDE_TRASH, collector); - if(outfit_items.count() != cof_items.count()) + if(outfit_items.size() != cof_items.size()) { // Current outfit folder should have one more item than the outfit folder. // this one item is the link back to the outfit folder itself. @@ -2667,8 +2668,8 @@ void LLAppearanceMgr::updateIsDirty() for (U32 i = 0; i < cof_items.size(); ++i) { - LLViewerInventoryItem *item1 = cof_items.get(i); - LLViewerInventoryItem *item2 = outfit_items.get(i); + LLViewerInventoryItem *item1 = cof_items.at(i); + LLViewerInventoryItem *item2 = outfit_items.at(i); if (item1->getLinkedUUID() != item2->getLinkedUUID() || item1->getName() != item2->getName() || @@ -2698,7 +2699,7 @@ void LLAppearanceMgr::copyLibraryGestures() gInventory.findLibraryCategoryUUIDForType(LLFolderType::FT_GESTURE,false); if (lib_gesture_cat_id.isNull()) { - llwarns << "Unable to copy gestures, source category not found" << llendl; + LL_WARNS() << "Unable to copy gestures, source category not found" << LL_ENDL; } LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE); @@ -2747,7 +2748,7 @@ void LLAppearanceMgr::copyLibraryGestures() LLUUID cat_id = findDescendentCategoryIDByName(lib_gesture_cat_id,folder_name); if (cat_id.isNull()) { - llwarns << self_av_string() << "failed to find gesture folder for " << folder_name << llendl; + LL_WARNS() << self_av_string() << "failed to find gesture folder for " << folder_name << LL_ENDL; } else { @@ -2839,12 +2840,12 @@ void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t& items_by_type.resize(LLWearableType::WT_COUNT); if (items.empty()) return; - for (S32 i=0; i<items.count(); i++) + for (S32 i=0; i<items.size(); i++) { - LLViewerInventoryItem *item = items.get(i); + LLViewerInventoryItem *item = items.at(i); if (!item) { - LL_WARNS("Appearance") << "NULL item found" << llendl; + LL_WARNS("Appearance") << "NULL item found" << LL_ENDL; continue; } // Ignore non-wearables. @@ -2879,7 +2880,7 @@ struct WearablesOrderComparator { if (!item1 || !item2) { - llwarning("either item1 or item2 is NULL", 0); + LL_WARNS() << "either item1 or item2 is NULL" << LL_ENDL; return true; } @@ -3044,7 +3045,7 @@ public: // Error /*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - llwarns << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << llendl; + LL_WARNS() << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << LL_ENDL; if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) { dumpContents(gAgentAvatarp->getFullname() + "_appearance_request_error", content); @@ -3059,7 +3060,7 @@ public: F32 seconds_to_wait; if (mRetryPolicy->shouldRetry(status,seconds_to_wait)) { - llinfos << "retrying" << llendl; + LL_INFOS() << "retrying" << LL_ENDL; doAfterInterval(boost::bind(&LLAppearanceMgr::requestServerAppearanceUpdate, LLAppearanceMgr::getInstance(), LLCurl::ResponderPtr(this)), @@ -3067,7 +3068,7 @@ public: } else { - llwarns << "giving up after too many retries" << llendl; + LL_WARNS() << "giving up after too many retries" << LL_ENDL; } } @@ -3082,7 +3083,7 @@ public: void debugCOF(const LLSD& content) { - LL_DEBUGS("Avatar") << "AIS COF, version found: " << content["expected"].asInteger() << llendl; + LL_DEBUGS("Avatar") << "AIS COF, version found: " << content["expected"].asInteger() << LL_ENDL; std::set<LLUUID> ais_items, local_items; const LLSD& cof_raw = content["cof_raw"]; for (LLSD::array_const_iterator it = cof_raw.beginArray(); @@ -3097,14 +3098,14 @@ public: LL_DEBUGS("Avatar") << "Link: item_id: " << item["item_id"].asUUID() << " linked_item_id: " << item["asset_id"].asUUID() << " name: " << item["name"].asString() - << llendl; + << LL_ENDL; } else if (item["type"].asInteger() == 25) // folder link { LL_DEBUGS("Avatar") << "Folder link: item_id: " << item["item_id"].asUUID() << " linked_item_id: " << item["asset_id"].asUUID() << " name: " << item["name"].asString() - << llendl; + << LL_ENDL; } else @@ -3112,38 +3113,38 @@ public: LL_DEBUGS("Avatar") << "Other: item_id: " << item["item_id"].asUUID() << " linked_item_id: " << item["asset_id"].asUUID() << " name: " << item["name"].asString() - << llendl; + << LL_ENDL; } } } - LL_DEBUGS("Avatar") << llendl; - LL_DEBUGS("Avatar") << "Local COF, version requested: " << content["observed"].asInteger() << llendl; + LL_DEBUGS("Avatar") << LL_ENDL; + LL_DEBUGS("Avatar") << "Local COF, version requested: " << content["observed"].asInteger() << LL_ENDL; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(), cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH); - for (S32 i=0; i<item_array.count(); i++) + for (S32 i=0; i<item_array.size(); i++) { - const LLViewerInventoryItem* inv_item = item_array.get(i).get(); + const LLViewerInventoryItem* inv_item = item_array.at(i).get(); local_items.insert(inv_item->getUUID()); LL_DEBUGS("Avatar") << "item_id: " << inv_item->getUUID() << " linked_item_id: " << inv_item->getLinkedUUID() << " name: " << inv_item->getName() - << llendl; + << LL_ENDL; } - LL_DEBUGS("Avatar") << llendl; + LL_DEBUGS("Avatar") << LL_ENDL; for (std::set<LLUUID>::iterator it = local_items.begin(); it != local_items.end(); ++it) { if (ais_items.find(*it) == ais_items.end()) { - LL_DEBUGS("Avatar") << "LOCAL ONLY: " << *it << llendl; + LL_DEBUGS("Avatar") << "LOCAL ONLY: " << *it << LL_ENDL; } } for (std::set<LLUUID>::iterator it = ais_items.begin(); it != ais_items.end(); ++it) { if (local_items.find(*it) == local_items.end()) { - LL_DEBUGS("Avatar") << "AIS ONLY: " << *it << llendl; + LL_DEBUGS("Avatar") << "AIS ONLY: " << *it << LL_ENDL; } } } @@ -3159,9 +3160,9 @@ LLSD LLAppearanceMgr::dumpCOF() const LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(getCOF(),cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH); - for (S32 i=0; i<item_array.count(); i++) + for (S32 i=0; i<item_array.size(); i++) { - const LLViewerInventoryItem* inv_item = item_array.get(i).get(); + const LLViewerInventoryItem* inv_item = item_array.at(i).get(); LLSD item; LLUUID item_id(inv_item->getUUID()); md5.update((unsigned char*)item_id.mData, 16); @@ -3177,17 +3178,17 @@ LLSD LLAppearanceMgr::dumpCOF() const const LLViewerInventoryItem* linked_item = inv_item->getLinkedItem(); if (NULL == linked_item) { - llwarns << "Broken link for item '" << inv_item->getName() + LL_WARNS() << "Broken link for item '" << inv_item->getName() << "' (" << inv_item->getUUID() - << ") during requestServerAppearanceUpdate" << llendl; + << ") during requestServerAppearanceUpdate" << LL_ENDL; continue; } // Some assets may be 'hidden' and show up as null in the viewer. //if (linked_item->getAssetUUID().isNull()) //{ - // llwarns << "Broken link (null asset) for item '" << inv_item->getName() + // LL_WARNS() << "Broken link (null asset) for item '" << inv_item->getName() // << "' (" << inv_item->getUUID() - // << ") during requestServerAppearanceUpdate" << llendl; + // << ") during requestServerAppearanceUpdate" << LL_ENDL; // continue; //} LLUUID linked_asset_id(linked_item->getAssetUUID()); @@ -3197,10 +3198,10 @@ LLSD LLAppearanceMgr::dumpCOF() const } else if (LLAssetType::AT_LINK_FOLDER != inv_item->getActualType()) { - llwarns << "Non-link item '" << inv_item->getName() + LL_WARNS() << "Non-link item '" << inv_item->getName() << "' (" << inv_item->getUUID() << ") type " << (S32) inv_item->getActualType() - << " during requestServerAppearanceUpdate" << llendl; + << " during requestServerAppearanceUpdate" << LL_ENDL; continue; } links.append(item); @@ -3224,17 +3225,17 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond if (!gAgent.getRegion()) { - llwarns << "Region not set, cannot request server appearance update" << llendl; + LL_WARNS() << "Region not set, cannot request server appearance update" << LL_ENDL; return; } if (gAgent.getRegion()->getCentralBakeVersion()==0) { - llwarns << "Region does not support baking" << llendl; + LL_WARNS() << "Region does not support baking" << LL_ENDL; } std::string url = gAgent.getRegion()->getCapability("UpdateAvatarAppearance"); if (url.empty()) { - llwarns << "No cap for UpdateAvatarAppearance." << llendl; + LL_WARNS() << "No cap for UpdateAvatarAppearance." << LL_ENDL; return; } @@ -3252,7 +3253,7 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond body["cof_version"] = cof_version+999; } } - LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl; + LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << LL_ENDL; //LLCurl::ResponderPtr responder_ptr; if (!responder_ptr.get()) @@ -3278,7 +3279,7 @@ public: virtual void result(const LLSD &pContent) { - llinfos << "Successfully incremented agent's COF." << llendl; + LL_INFOS() << "Successfully incremented agent's COF." << LL_ENDL; S32 new_version = pContent["category"]["version"].asInteger(); // cof_version should have increased @@ -3288,12 +3289,12 @@ public: } virtual void errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& content) { - llwarns << "While attempting to increment the agent's cof we got an error with [status:" - << pStatus << "]: " << content << llendl; + LL_WARNS() << "While attempting to increment the agent's cof we got an error with [status:" + << pStatus << "]: " << content << LL_ENDL; F32 seconds_to_wait; if (mRetryPolicy->shouldRetry(pStatus,seconds_to_wait)) { - llinfos << "retrying" << llendl; + LL_INFOS() << "retrying" << LL_ENDL; doAfterInterval(boost::bind(&LLAppearanceMgr::incrementCofVersion, LLAppearanceMgr::getInstance(), LLHTTPClient::ResponderPtr(this)), @@ -3301,7 +3302,7 @@ public: } else { - llwarns << "giving up after too many retries" << llendl; + LL_WARNS() << "giving up after too many retries" << LL_ENDL; } } @@ -3313,19 +3314,19 @@ void LLAppearanceMgr::incrementCofVersion(LLHTTPClient::ResponderPtr responder_p // If we don't have a region, report it as an error if (gAgent.getRegion() == NULL) { - llwarns << "Region not set, cannot request cof_version increment" << llendl; + LL_WARNS() << "Region not set, cannot request cof_version increment" << LL_ENDL; return; } std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion"); if (url.empty()) { - llwarns << "No cap for IncrementCofVersion." << llendl; + LL_WARNS() << "No cap for IncrementCofVersion." << LL_ENDL; return; } - llinfos << "Requesting cof_version be incremented via capability to: " - << url << llendl; + LL_INFOS() << "Requesting cof_version be incremented via capability to: " + << url << LL_ENDL; LLSD headers; LLSD body = LLSD::emptyMap(); @@ -3350,7 +3351,7 @@ void show_created_outfit(LLUUID& folder_id, bool show_panel = true) { if (!LLApp::isRunning()) { - llwarns << "called during shutdown, skipping" << llendl; + LL_WARNS() << "called during shutdown, skipping" << LL_ENDL; return; } @@ -3412,7 +3413,7 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove) { if (ids_to_remove.empty()) { - llwarns << "called with empty list, nothing to do" << llendl; + LL_WARNS() << "called with empty list, nothing to do" << LL_ENDL; } for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it) { @@ -3442,7 +3443,7 @@ void LLAppearanceMgr::addDoomedTempAttachment(const LLUUID& id_to_remove) { // If this is a temp attachment and we want to remove it, record the ID // so it will be deleted when attachments are synced up with COF mDoomedTempAttachmentIDs.insert(id_to_remove); - //llinfos << "Will remove temp attachment id " << id_to_remove << llendl; + //LL_INFOS() << "Will remove temp attachment id " << id_to_remove << LL_ENDL; } } @@ -3531,26 +3532,26 @@ void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg) gInventory.collectDescendents(cat_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); #ifdef DUMP_CAT_VERBOSE - llinfos << llendl; - llinfos << str << llendl; + LL_INFOS() << LL_ENDL; + LL_INFOS() << str << LL_ENDL; S32 hitcount = 0; - for(S32 i=0; i<items.count(); i++) + for(S32 i=0; i<items.size(); i++) { LLViewerInventoryItem *item = items.get(i); if (item) hitcount++; - llinfos << i <<" "<< item->getName() <<llendl; + LL_INFOS() << i <<" "<< item->getName() <<LL_ENDL; } #endif - llinfos << msg << " count " << items.count() << llendl; + LL_INFOS() << msg << " count " << items.size() << LL_ENDL; } void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items, const std::string& msg) { - for (S32 i=0; i<items.count(); i++) + for (S32 i=0; i<items.size(); i++) { - LLViewerInventoryItem *item = items.get(i); + LLViewerInventoryItem *item = items.at(i); LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL; LLUUID asset_id; if (linked_item) @@ -3585,13 +3586,13 @@ LLAppearanceMgr::~LLAppearanceMgr() void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val) { - LL_DEBUGS("Avatar") << "setAttachmentInvLinkEnable => " << (int) val << llendl; + LL_DEBUGS("Avatar") << "setAttachmentInvLinkEnable => " << (int) val << LL_ENDL; mAttachmentInvLinkEnabled = val; } void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg) { - llinfos << msg << llendl; + LL_INFOS() << msg << LL_ENDL; for (std::set<LLUUID>::const_iterator it = atts.begin(); it != atts.end(); ++it) @@ -3599,11 +3600,11 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg) LLUUID item_id = *it; LLViewerInventoryItem *item = gInventory.getItem(item_id); if (item) - llinfos << "atts " << item->getName() << llendl; + LL_INFOS() << "atts " << item->getName() << LL_ENDL; else - llinfos << "atts " << "UNKNOWN[" << item_id.asString() << "]" << llendl; + LL_INFOS() << "atts " << "UNKNOWN[" << item_id.asString() << "]" << LL_ENDL; } - llinfos << llendl; + LL_INFOS() << LL_ENDL; } void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) @@ -3619,7 +3620,7 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) } else { - //llinfos << "no link changes, inv link not enabled" << llendl; + //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL; } } @@ -3633,7 +3634,7 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) } else { - //llinfos << "no link changes, inv link not enabled" << llendl; + //LL_INFOS() << "no link changes, inv link not enabled" << LL_ENDL; } } @@ -3699,8 +3700,8 @@ public: } virtual void done() { - llinfos << this << " done with incomplete " << mIncomplete.size() - << " complete " << mComplete.size() << " calling callable" << llendl; + LL_INFOS() << this << " done with incomplete " << mIncomplete.size() + << " complete " << mComplete.size() << " calling callable" << LL_ENDL; gInventory.removeObserver(this); doOnIdleOneTime(mCallable); @@ -3732,11 +3733,11 @@ public: cat_array, item_array, LLInventoryModel::EXCLUDE_TRASH); - S32 count = item_array.count(); + S32 count = item_array.size(); if(!count) { - llwarns << "Nothing fetched in category " << mComplete.front() - << llendl; + LL_WARNS() << "Nothing fetched in category " << mComplete.front() + << LL_ENDL; gInventory.removeObserver(this); doOnIdleOneTime(mCallable); @@ -3744,11 +3745,11 @@ public: return; } - llinfos << "stage1 got " << item_array.count() << " items, passing to stage2 " << llendl; + LL_INFOS() << "stage1 got " << item_array.size() << " items, passing to stage2 " << LL_ENDL; uuid_vec_t ids; for(S32 i = 0; i < count; ++i) { - ids.push_back(item_array.get(i)->getUUID()); + ids.push_back(item_array.at(i)->getUUID()); } gInventory.removeObserver(this); |