From a1d06e682edaa59342f798eddc65c771658386cd Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 4 Apr 2019 22:20:21 -0400 Subject: [PATCH] Switch to using typedef'd uuid types everywhere and auto for iterators Oh, and some related opts. --- indra/llcharacter/llmotioncontroller.cpp | 4 +-- indra/llcharacter/llmultigesture.h | 4 +-- indra/llmessage/llassetstorage.h | 2 +- indra/llmessage/llavatarnamecache.cpp | 10 +++--- indra/llmessage/llcachename.cpp | 2 +- indra/newview/chatbar_as_cmdline.cpp | 2 +- indra/newview/daeexport.h | 2 +- indra/newview/jcfloaterareasearch.cpp | 4 +-- indra/newview/jcfloaterareasearch.h | 2 +- indra/newview/llaccountingcostmanager.h | 6 ++-- indra/newview/llagent.cpp | 16 ++++----- indra/newview/llagent.h | 4 +-- indra/newview/llagentwearables.cpp | 4 +-- indra/newview/llappearancemgr.cpp | 18 +++++----- indra/newview/llappearancemgr.h | 2 +- indra/newview/llattachmentsmgr.cpp | 4 +-- indra/newview/llattachmentsmgr.h | 6 ++-- indra/newview/llavataractions.cpp | 4 +-- indra/newview/llcallingcard.h | 6 ++-- indra/newview/llcompilequeue.h | 2 +- indra/newview/llfavoritesbar.cpp | 4 +-- indra/newview/llfavoritesbar.h | 2 +- indra/newview/llfloateravatarlist.cpp | 4 +-- indra/newview/llfloaterblacklist.cpp | 23 ++++++------ indra/newview/llfloaterblacklist.h | 10 ++---- indra/newview/llfloaterbulkpermission.cpp | 4 +-- indra/newview/llfloaterbulkpermission.h | 2 +- indra/newview/llfloaterexploresounds.cpp | 4 +-- indra/newview/llfloatergroupinvite.cpp | 2 +- indra/newview/llfloatergroupinvite.h | 2 +- indra/newview/llfloaterinspect.cpp | 2 +- indra/newview/llfloaterinspect.h | 2 +- indra/newview/llfloaterland.cpp | 2 +- indra/newview/llfloaterland.h | 3 +- indra/newview/llfloaterworldmap.h | 4 +-- indra/newview/llfolderview.cpp | 4 +-- indra/newview/llgroupmgr.cpp | 4 +-- indra/newview/llimpanel.cpp | 12 +++---- indra/newview/llimpanel.h | 4 +-- indra/newview/llimview.cpp | 10 +++--- indra/newview/llimview.h | 10 +++--- indra/newview/llinventoryactions.cpp | 2 +- indra/newview/llinventorybridge.cpp | 32 ++++++++--------- indra/newview/llinventoryclipboard.cpp | 6 ++-- indra/newview/llinventoryclipboard.h | 6 ++-- indra/newview/llinventoryfunctions.cpp | 4 +-- indra/newview/llinventoryfunctions.h | 4 +-- indra/newview/llinventorymodel.cpp | 16 ++++----- indra/newview/llinventorymodel.h | 2 +- indra/newview/llinventoryobserver.cpp | 4 +-- indra/newview/llinventoryobserver.h | 2 +- indra/newview/lllandmarklist.h | 2 +- indra/newview/llmarketplacefunctions.cpp | 16 ++++----- indra/newview/llmarketplacefunctions.h | 2 +- indra/newview/llmaterialmgr.h | 2 +- indra/newview/llmeshrepository.cpp | 20 +++++------ indra/newview/llmeshrepository.h | 14 ++++---- indra/newview/llpanelgroupbulkban.cpp | 10 +++--- indra/newview/llpanelgroupbulkimpl.h | 2 +- indra/newview/llsculptidsize.h | 2 +- indra/newview/llselectmgr.cpp | 3 +- indra/newview/llspeakers.cpp | 4 +-- indra/newview/lltexturecache.cpp | 4 +-- indra/newview/lltexturecache.h | 2 +- indra/newview/lltexturefetch.h | 4 +-- indra/newview/lltooldraganddrop.cpp | 4 +-- indra/newview/lltracker.h | 4 +-- indra/newview/llviewerinventory.cpp | 4 +-- indra/newview/llviewermessage.cpp | 20 +++++------ indra/newview/llviewerobjectlist.cpp | 4 +-- indra/newview/llviewerobjectlist.h | 10 +++--- indra/newview/llviewerregion.cpp | 2 +- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/llvoavatar.cpp | 44 +++++++++++------------ indra/newview/llvoavatar.h | 16 ++++----- indra/newview/llvoiceclient.cpp | 4 +-- indra/newview/llvoiceclient.h | 4 +-- indra/newview/llvoicevivox.cpp | 2 +- indra/newview/llvoicevivox.h | 2 +- indra/newview/rlvcommon.cpp | 2 +- indra/newview/rlvinventory.h | 2 +- indra/test/lluuidhashmap_tut.cpp | 14 ++++---- 82 files changed, 252 insertions(+), 271 deletions(-) diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 7ff348d81..3f5b65f52 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -200,7 +200,7 @@ void LLMotionController::purgeExcessMotions() } // - std::set motions_to_kill; + uuid_set_t motions_to_kill; if (1) // Singu: leave indentation alone... { @@ -220,7 +220,7 @@ void LLMotionController::purgeExcessMotions() } // clean up all inactive, loaded motions - for (std::set::iterator motion_it = motions_to_kill.begin(); + for (auto motion_it = motions_to_kill.begin(); motion_it != motions_to_kill.end(); ++motion_it) { diff --git a/indra/llcharacter/llmultigesture.h b/indra/llcharacter/llmultigesture.h index 60cdb2f59..68395465b 100644 --- a/indra/llcharacter/llmultigesture.h +++ b/indra/llcharacter/llmultigesture.h @@ -100,11 +100,11 @@ public: std::function mDoneCallback; // Animations that we requested to start - boost::unordered_set mRequestedAnimIDs; + uuid_set_t mRequestedAnimIDs; // Once the animation starts playing (sim says to start playing) // the ID is moved from mRequestedAnimIDs to here. - boost::unordered_set mPlayingAnimIDs; + uuid_set_t mPlayingAnimIDs; }; diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index e6f22f7c9..0e29d9207 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -249,7 +249,7 @@ public: // note that your callback may get called BEFORE the function returns void getAssetData(const LLUUID uuid, LLAssetType::EType atype, LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE); - std::vector mBlackListedAsset; + uuid_vec_t mBlackListedAsset; /* * TransactionID version diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 2e39e17b5..be364a3bd 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -64,7 +64,7 @@ namespace LLAvatarNameCache std::string sNameLookupURL; // Accumulated agent IDs for next query against service - typedef std::set ask_queue_t; + typedef uuid_set_t ask_queue_t; ask_queue_t sAskQueue; // Agent IDs that have been requested, but with no reply. @@ -175,14 +175,14 @@ class LLAvatarNameResponder : public LLHTTPClient::ResponderWithResult private: // need to store agent ids that are part of this request in case of // an error, so we can flag them as unavailable - std::vector mAgentIDs; + uuid_vec_t mAgentIDs; // Need the headers to look up Expires: and Retry-After: /*virtual*/ bool needsHeaders() const { return true; } /*virtual*/ char const* getName() const { return "LLAvatarNameResponder"; } public: - LLAvatarNameResponder(const std::vector& agent_ids) + LLAvatarNameResponder(const uuid_vec_t& agent_ids) : mAgentIDs(agent_ids) { } @@ -253,7 +253,7 @@ protected: LL_WARNS("AvNameCache") << dumpResponse() << LL_ENDL; // Add dummy records for any agent IDs in this request that we do not have cached already - std::vector::const_iterator it = mAgentIDs.begin(); + auto it = mAgentIDs.begin(); for ( ; it != mAgentIDs.end(); ++it) { const LLUUID& agent_id = *it; @@ -327,7 +327,7 @@ void LLAvatarNameCache::requestNamesViaCapability() std::string url; url.reserve(NAME_URL_MAX); - std::vector agent_ids; + uuid_vec_t agent_ids; agent_ids.reserve(128); U32 ids = 0; diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index eafb0ea97..143914408 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -185,7 +185,7 @@ void ReplySender::flush() } -typedef std::set AskQueue; +typedef uuid_set_t AskQueue; typedef std::list ReplyQueue; typedef std::map PendingQueue; typedef std::map Cache; diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 2863cfe92..145f3c9fe 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -632,7 +632,7 @@ bool cmd_line_chat(std::string data, EChatType type) // even if they are out of draw distance. LLUUID cmdline_partial_name2key(std::string partial_name) { - std::vector avatars; + uuid_vec_t avatars; std::string av_name; LLStringUtil::toLower(partial_name); LLWorld::getInstance()->getAvatars(&avatars); diff --git a/indra/newview/daeexport.h b/indra/newview/daeexport.h index fbdd5b84c..910057340 100644 --- a/indra/newview/daeexport.h +++ b/indra/newview/daeexport.h @@ -77,7 +77,7 @@ public: }; typedef std::vector > obj_info_t; - typedef std::vector id_list_t; + typedef uuid_vec_t id_list_t; typedef std::vector string_list_t; typedef std::vector int_list_t; typedef std::vector material_list_t; diff --git a/indra/newview/jcfloaterareasearch.cpp b/indra/newview/jcfloaterareasearch.cpp index 9fb8a58dc..4c5ad09e1 100644 --- a/indra/newview/jcfloaterareasearch.cpp +++ b/indra/newview/jcfloaterareasearch.cpp @@ -217,7 +217,7 @@ void JCFloaterAreaSearch::results() LLUUID object_id = objectp->getID(); if(!requestIfNeeded(object_id)) { - std::map::iterator it = mCachedObjects.find(object_id); + auto it = mCachedObjects.find(object_id); if(it != mCachedObjects.end()) { //LL_INFOS() << "all entries are \"\" or we have data" << LL_ENDL; @@ -281,7 +281,7 @@ void JCFloaterAreaSearch::processObjectPropertiesFamily(LLMessageSystem* msg, vo LLUUID object_id; msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_ObjectID, object_id); - std::set::iterator it = floater->mPendingObjects.find(object_id); + auto it = floater->mPendingObjects.find(object_id); if(it != floater->mPendingObjects.end()) floater->mPendingObjects.erase(it); //else if(floater->mCachedObjects.count(object_id)) //Let entries update. diff --git a/indra/newview/jcfloaterareasearch.h b/indra/newview/jcfloaterareasearch.h index 413dbab99..05b199185 100644 --- a/indra/newview/jcfloaterareasearch.h +++ b/indra/newview/jcfloaterareasearch.h @@ -91,7 +91,7 @@ private: LLUUID owner_id; LLUUID group_id; }; - std::set mPendingObjects; + uuid_set_t mPendingObjects; std::map mCachedObjects; std::string mFilterStrings[LIST_OBJECT_COUNT]; diff --git a/indra/newview/llaccountingcostmanager.h b/indra/newview/llaccountingcostmanager.h index 731705288..9b6b80e6c 100644 --- a/indra/newview/llaccountingcostmanager.h +++ b/indra/newview/llaccountingcostmanager.h @@ -64,11 +64,11 @@ public: private: //Set of objects that will be used to generate a cost - std::set mObjectList; + uuid_set_t mObjectList; //During fetchCosts we move object into a the pending set to signify that //a fetch has been instigated. - std::set mPendingObjectQuota; - typedef std::set::iterator IDIt; + uuid_set_t mPendingObjectQuota; + typedef uuid_set_t::iterator IDIt; }; //=============================================================================== diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 457de28d5..f5ea77a9d 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3094,7 +3094,7 @@ LLQuaternion LLAgent::getHeadRotation() return rot; } -void LLAgent::sendAnimationRequests(const std::vector &anim_ids, EAnimRequest request) +void LLAgent::sendAnimationRequests(const uuid_vec_t &anim_ids, EAnimRequest request) { if (gAgentID.isNull()) { @@ -4457,7 +4457,7 @@ void LLAgent::stopCurrentAnimations() // avatar, propagating this change back to the server. if (isAgentAvatarValid()) { - std::vector anim_ids; + uuid_vec_t anim_ids; for ( LLVOAvatar::AnimIterator anim_it = gAgentAvatarp->mPlayingAnimations.begin(); @@ -4556,12 +4556,12 @@ void LLAgent::fidget() void LLAgent::stopFidget() { - std::vector anims; - anims.reserve(4); - anims.push_back(ANIM_AGENT_STAND_1); - anims.push_back(ANIM_AGENT_STAND_2); - anims.push_back(ANIM_AGENT_STAND_3); - anims.push_back(ANIM_AGENT_STAND_4); + const uuid_vec_t anims { + ANIM_AGENT_STAND_1, + ANIM_AGENT_STAND_2, + ANIM_AGENT_STAND_3, + ANIM_AGENT_STAND_4, + }; gAgent.sendAnimationRequests(anims, ANIM_REQUEST_STOP); } diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index facff5fe3..c31e758e1 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -525,7 +525,7 @@ public: void stopCurrentAnimations(); void requestStopMotion(LLMotion* motion); void onAnimStop(const LLUUID& id); - void sendAnimationRequests(const std::vector &anim_ids, EAnimRequest request); + void sendAnimationRequests(const uuid_vec_t &anim_ids, EAnimRequest request); void sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request); void sendAnimationStateReset(); void sendRevokePermissions(const LLUUID & target, U32 permissions); @@ -936,7 +936,7 @@ public: void friendsChanged(); private: LLFriendObserver* mFriendObserver; - std::set mProxyForAgents; + uuid_set_t mProxyForAgents; /** Groups ** ** diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index bf5d47d0a..de298c752 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1400,8 +1400,8 @@ void LLAgentWearables::findAttachmentsAddRemoveInfo(LLInventoryModel::item_array if (!isAgentAvatarValid()) return; - std::set requested_item_ids; - std::set current_item_ids; + uuid_set_t requested_item_ids; + uuid_set_t current_item_ids; for (U32 i=0; igetLinkedUUID(); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index baa6809ea..dc7665727 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1307,7 +1307,7 @@ static void onWearableAssetFetch(LLViewerWearable* wearable, void* data) static void removeDuplicateItems(LLInventoryModel::item_array_t& items) { LLInventoryModel::item_array_t new_items; - std::set items_seen; + uuid_set_t items_seen; std::deque tmp_list; // Traverse from the front and keep the first of each item // encountered, so we actually keep the *last* of each duplicate @@ -1336,7 +1336,7 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items) // [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2015-06-30 (Catznip-3.7) static void removeDuplicateWearableItemsByAssetID(LLInventoryModel::item_array_t& items) { - std::set idsAsset; + uuid_set_t idsAsset; items.erase(std::remove_if(items.begin(), items.end(), [&idsAsset](const LLViewerInventoryItem* pItem) { @@ -2602,7 +2602,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions, if (isAgentAvatarValid()) { // Include attachments which should be in COF but don't have their link created yet - std::set pendingAttachments; + uuid_set_t pendingAttachments; if (LLAttachmentsMgr::instance().getPendingAttachments(pendingAttachments)) { for (const LLUUID& idAttachItem : pendingAttachments) @@ -3806,7 +3806,7 @@ void RequestAgentUpdateAppearanceResponder::debugCOF(const LLSD& content) { LL_INFOS("Avatar") << "AIS COF, version received: " << content["expected"].asInteger() << " ================================= " << LL_ENDL; - std::set ais_items, local_items; + uuid_set_t ais_items, local_items; const LLSD& cof_raw = content["cof_raw"]; for (LLSD::array_const_iterator it = cof_raw.beginArray(); it != cof_raw.endArray(); ++it) @@ -3858,7 +3858,7 @@ void RequestAgentUpdateAppearanceResponder::debugCOF(const LLSD& content) } LL_INFOS("Avatar") << " ================================= " << LL_ENDL; S32 local_only = 0, ais_only = 0; - for (std::set::iterator it = local_items.begin(); it != local_items.end(); ++it) + for (auto it = local_items.begin(); it != local_items.end(); ++it) { if (ais_items.find(*it) == ais_items.end()) { @@ -3866,7 +3866,7 @@ void RequestAgentUpdateAppearanceResponder::debugCOF(const LLSD& content) local_only++; } } - for (std::set::iterator it = ais_items.begin(); it != ais_items.end(); ++it) + for (auto it = ais_items.begin(); it != ais_items.end(); ++it) { if (local_items.find(*it) == local_items.end()) { @@ -4351,7 +4351,7 @@ private: bool mFailed; std::vector > mPendingCopies; std::vector > mPendingLinks; - std::set mWearItems; + uuid_set_t mWearItems; std::vector mActiveRequests; }; @@ -4661,10 +4661,10 @@ void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val) mAttachmentInvLinkEnabled = val; } -void dumpAttachmentSet(const std::set& atts, const std::string& msg) +void dumpAttachmentSet(const uuid_set_t& atts, const std::string& msg) { LL_INFOS() << msg << LL_ENDL; - for (std::set::const_iterator it = atts.begin(); + for (auto it = atts.begin(); it != atts.end(); ++it) { diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index a0c7fc3d8..46edd4a99 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -290,7 +290,7 @@ private: std::auto_ptr mUnlockOutfitTimer; // Set of temp attachment UUIDs that should be removed - typedef std::set doomed_temp_attachments_t; + typedef uuid_set_t doomed_temp_attachments_t; doomed_temp_attachments_t mDoomedTempAttachmentIDs; void addDoomedTempAttachment(const LLUUID& id_to_remove); diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index e556ec61b..5395d42df 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -305,7 +305,7 @@ void LLAttachmentsMgr::linkRecentlyArrivedAttachments() << " recently arrived items" << LL_ENDL; uuid_vec_t ids_to_link; - for (std::set::iterator it = mRecentlyArrivedAttachments.begin(); + for (auto it = mRecentlyArrivedAttachments.begin(); it != mRecentlyArrivedAttachments.end(); ++it) { if (isAgentAvatarValid() && @@ -344,7 +344,7 @@ void LLAttachmentsMgr::linkRecentlyArrivedAttachments() } // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.2) -bool LLAttachmentsMgr::getPendingAttachments(std::set& ids) const +bool LLAttachmentsMgr::getPendingAttachments(uuid_set_t& ids) const { ids.clear(); diff --git a/indra/newview/llattachmentsmgr.h b/indra/newview/llattachmentsmgr.h index cd516adbf..84fb76bbe 100644 --- a/indra/newview/llattachmentsmgr.h +++ b/indra/newview/llattachmentsmgr.h @@ -95,7 +95,7 @@ public: // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1) public: void clearPendingAttachmentLink(const LLUUID& idItem); - bool getPendingAttachments(std::set& ids) const; + bool getPendingAttachments(uuid_set_t& ids) const; protected: void onRegisterAttachmentComplete(const LLUUID& idAttachLink); friend class LLRegisterAttachmentCallback; @@ -136,12 +136,12 @@ private: LLItemRequestTimes mDetachRequests; // Attachments that have arrived but have not been linked in the COF yet. - std::set mRecentlyArrivedAttachments; + uuid_set_t mRecentlyArrivedAttachments; LLTimer mCOFLinkBatchTimer; // [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-18 (Catznip-2.1) // Attachments that have pending link creation - std::set mPendingAttachLinks; + uuid_set_t mPendingAttachLinks; // [/SL:KB] // // Attachments that are linked in the COF but may be invalid. diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index db20a0983..463f3404f 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -162,9 +162,7 @@ void LLAvatarActions::offerTeleport(const LLUUID& invitee) if (invitee.isNull()) return; - std::vector ids; - ids.push_back(invitee); - offerTeleport(ids); + offerTeleport(uuid_vec_t{invitee}); } // static diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h index 104b5122c..9d4948783 100644 --- a/indra/newview/llcallingcard.h +++ b/indra/newview/llcallingcard.h @@ -165,7 +165,7 @@ public: */ void addChangedMask(U32 mask, const LLUUID& referent); - const std::set& getChangedIDs() { return mChangedBuddyIDs; } + const uuid_set_t& getChangedIDs() { return mChangedBuddyIDs; } // Apply the functor to every buddy. Do not actually modify the // buddy list in the functor or bad things will happen. @@ -201,7 +201,7 @@ protected: buddy_map_t mBuddyInfo; - typedef std::set changed_buddy_t; + typedef uuid_set_t changed_buddy_t; changed_buddy_t mChangedBuddyIDs; typedef std::vector observer_list_t; @@ -229,7 +229,7 @@ public: LLCollectProxyBuddies() {} virtual ~LLCollectProxyBuddies() {} virtual bool operator()(const LLUUID& buddy_id, LLRelationship* buddy); - typedef std::set buddy_list_t; + typedef uuid_set_t buddy_list_t; buddy_list_t mProxy; }; diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index 9bb67d9cb..25212de11 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -110,7 +110,7 @@ protected: LLButton* mCloseBtn; // Object Queue - std::vector mObjectIDs; + uuid_vec_t mObjectIDs; LLUUID mCurrentObjectID; bool mDone; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index d578b6062..71e1b6a8c 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1233,7 +1233,7 @@ BOOL LLFavoritesBarCtrl::isClipboardPasteable() const return FALSE; } - std::vector objects; + uuid_vec_t objects; LLInventoryClipboard::instance().retrieve(objects); S32 count = objects.size(); for(S32 i = 0; i < count; i++) @@ -1262,7 +1262,7 @@ void LLFavoritesBarCtrl::pasteFromClipboard() const if(model && isClipboardPasteable()) { LLInventoryItem* item = NULL; - std::vector objects; + uuid_vec_t objects; LLInventoryClipboard::instance().retrieve(objects); S32 count = objects.size(); LLUUID parent_id(mFavoriteFolderId); diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index ef6f55c5e..48f26624f 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -236,7 +236,7 @@ private: typedef std::map slurls_map_t; slurls_map_t mSLURLs; - std::set mMissingSLURLs; + uuid_set_t mMissingSLURLs; bool mIsDirty; struct IsNotInFavorites diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index cbd8d9e92..bb614ec31 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -561,7 +561,7 @@ void LLFloaterAvatarList::updateAvatarList(const LLViewerRegion* region, bool fi { const std::vector& map_avs(region->mMapAvatars); - const std::vector& map_avids(region->mMapAvatarIDs); + const uuid_vec_t& map_avids(region->mMapAvatarIDs); const LLVector3d& mypos(gAgent.getPositionGlobal()); const LLVector3d& origin(region->getOriginGlobal()); const F32 max_range(radar_range_radius() * radar_range_radius()); @@ -636,7 +636,7 @@ void LLFloaterAvatarList::expireAvatarList(const std::list& ids) { if (!ids.empty()) { - std::vector existing_avs; + uuid_vec_t existing_avs; std::vector neighbors; gAgent.getRegion()->getNeighboringRegions(neighbors); for (const LLViewerRegion* region : neighbors) diff --git a/indra/newview/llfloaterblacklist.cpp b/indra/newview/llfloaterblacklist.cpp index 255552928..d4409b875 100644 --- a/indra/newview/llfloaterblacklist.cpp +++ b/indra/newview/llfloaterblacklist.cpp @@ -20,8 +20,8 @@ LLFloaterBlacklist* LLFloaterBlacklist::sInstance; -std::vector LLFloaterBlacklist::blacklist_textures; -std::vector LLFloaterBlacklist::blacklist_objects; +uuid_vec_t LLFloaterBlacklist::blacklist_textures; +uuid_vec_t LLFloaterBlacklist::blacklist_objects; std::map LLFloaterBlacklist::blacklist_entries; @@ -88,7 +88,7 @@ void LLFloaterBlacklist::refresh() LLScrollListCtrl* list = getChild("file_list"); list->clearRows(); - for(std::map::iterator iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter) + for(auto iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter) { if(iter->first.isNull()) continue; LLSD element; @@ -246,7 +246,7 @@ void LLFloaterBlacklist::updateBlacklists() blacklist_textures.clear(); blacklist_objects.clear(); gAssetStorage->mBlackListedAsset.clear(); - for(std::map::iterator iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter) + for(auto iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter) { if(blacklist_entries[iter->first]["entry_type"].asString() == "0") { @@ -276,7 +276,7 @@ void LLFloaterBlacklist::saveToDisk() std::string file_name = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "blacklist_sg1.xml"); llofstream export_file(file_name); LLSD data; - for(std::map::iterator iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter) + for(auto iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter) { data[iter->first.asString()] = iter->second; } @@ -300,7 +300,7 @@ void LLFloaterBlacklist::onClickSave_continued(AIFilePicker* filepicker) std::string file_name = filepicker->getFilename(); llofstream export_file(file_name); LLSD data; - for(std::map::iterator iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter) + for(auto iter = blacklist_entries.begin(); iter != blacklist_entries.end(); ++iter) { data[iter->first.asString()] = iter->second; } @@ -340,14 +340,13 @@ void LLFloaterBlacklist::onClickLoad_continued(AIFilePicker* filepicker) void LLFloaterBlacklist::onClickRerender(void* user_data) { - std::map blacklist_new; - for(std::map::iterator itr = blacklist_entries.begin(); itr != blacklist_entries.end(); ++itr) + for(auto itr = blacklist_entries.begin(); itr != blacklist_entries.end();) { - if(blacklist_entries[itr->first]["entry_type"].asString() == "6") continue; - blacklist_new[itr->first] = blacklist_entries[itr->first]; - blacklist_new[itr->second] = blacklist_entries[itr->second]; + if (blacklist_entries[itr->first]["entry_type"].asString() == "6") + itr = blacklist_entries.erase(itr); + else + ++itr; } - blacklist_entries = blacklist_new; saveToDisk(); LLFloaterBlacklist* instance = LLFloaterBlacklist::getInstance(); if(instance) diff --git a/indra/newview/llfloaterblacklist.h b/indra/newview/llfloaterblacklist.h index 9b5c4171f..dd666db57 100644 --- a/indra/newview/llfloaterblacklist.h +++ b/indra/newview/llfloaterblacklist.h @@ -16,8 +16,7 @@ public: BOOL postBuild(); void refresh(); static LLFloaterBlacklist* getInstance() { return sInstance; }; - - + /*This is the function to call to add anything to the blacklist, key is the asset ID LLSD data is as follows: LLSD[entry_type] = LLAssetType::Etype, @@ -29,12 +28,9 @@ public: */ static void addEntry(LLUUID key, LLSD data); - - - static std::map blacklist_entries; - static std::vector blacklist_textures; - static std::vector blacklist_objects; + static uuid_vec_t blacklist_textures; + static uuid_vec_t blacklist_objects; static void loadFromSave(); diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 7e9589a79..7fb149ee5 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -79,7 +79,7 @@ void LLFloaterBulkPermission::doApply() class ModifiableGatherer : public LLSelectedNodeFunctor { public: - ModifiableGatherer(std::vector& q) : mQueue(q) {} + ModifiableGatherer(uuid_vec_t& q) : mQueue(q) {} virtual bool apply(LLSelectNode* node) { if( node->allowOperationOnNode(PERM_MODIFY, GP_OBJECT_MANIPULATE) ) @@ -89,7 +89,7 @@ void LLFloaterBulkPermission::doApply() return true; } private: - std::vector& mQueue; + uuid_vec_t& mQueue; }; LLScrollListCtrl* list = getChild("queue output"); list->deleteAllItems(); diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h index 428e8ae96..ccbeb6741 100644 --- a/indra/newview/llfloaterbulkpermission.h +++ b/indra/newview/llfloaterbulkpermission.h @@ -89,7 +89,7 @@ private: private: // Object Queue - std::vector mObjectIDs; + uuid_vec_t mObjectIDs; LLUUID mCurrentObjectID; BOOL mDone; diff --git a/indra/newview/llfloaterexploresounds.cpp b/indra/newview/llfloaterexploresounds.cpp index 36caef3e9..94400f31f 100644 --- a/indra/newview/llfloaterexploresounds.cpp +++ b/indra/newview/llfloaterexploresounds.cpp @@ -295,7 +295,7 @@ void LLFloaterExploreSounds::handle_play_locally(void* user_data) std::vector selection = list->getAllSelected(); std::vector::iterator selection_iter = selection.begin(); std::vector::iterator selection_end = selection.end(); - std::vector asset_list; + uuid_vec_t asset_list; for( ; selection_iter != selection_end; ++selection_iter) { LLSoundHistoryItem item = floater->getItem((*selection_iter)->getValue()); @@ -353,7 +353,7 @@ void LLFloaterExploreSounds::handle_stop(void* user_data) std::vector selection = list->getAllSelected(); std::vector::iterator selection_iter = selection.begin(); std::vector::iterator selection_end = selection.end(); - std::vector asset_list; + uuid_vec_t asset_list; for( ; selection_iter != selection_end; ++selection_iter) { LLSoundHistoryItem item = floater->getItem((*selection_iter)->getValue()); diff --git a/indra/newview/llfloatergroupinvite.cpp b/indra/newview/llfloatergroupinvite.cpp index 207ec78f5..656854e41 100644 --- a/indra/newview/llfloatergroupinvite.cpp +++ b/indra/newview/llfloatergroupinvite.cpp @@ -112,7 +112,7 @@ LLFloaterGroupInvite::~LLFloaterGroupInvite() } // static -void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector *agent_ids) +void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, uuid_vec_t *agent_ids) { // Make sure group_id isn't null if (group_id.isNull()) diff --git a/indra/newview/llfloatergroupinvite.h b/indra/newview/llfloatergroupinvite.h index d1485ead9..48c15c3aa 100644 --- a/indra/newview/llfloatergroupinvite.h +++ b/indra/newview/llfloatergroupinvite.h @@ -43,7 +43,7 @@ class LLFloaterGroupInvite public: virtual ~LLFloaterGroupInvite(); - static void showForGroup(const LLUUID &group_id, std::vector *agent_ids = NULL); + static void showForGroup(const LLUUID &group_id, uuid_vec_t *agent_ids = NULL); protected: LLFloaterGroupInvite(const std::string& name, diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index f6c24f2fb..c4abc4ac7 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -371,7 +371,7 @@ void LLFloaterInspect::refresh() // void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object, LLInventoryObject::object_list_t* inv, S32, void*) { - std::vector::iterator iter = std::find(mQueue.begin(),mQueue.end(),viewer_object->getID()); + auto iter = std::find(mQueue.begin(),mQueue.end(),viewer_object->getID()); if (viewer_object && inv && iter != mQueue.end()) { U32 scripts = 0; diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h index 633507b5c..643639692 100644 --- a/indra/newview/llfloaterinspect.h +++ b/indra/newview/llfloaterinspect.h @@ -82,7 +82,7 @@ private: LLSafeHandle mObjectSelection; // std::map > mInventoryNums; // - std::vector mQueue; + uuid_vec_t mQueue; // std::map mOwnerNameCacheConnection; std::map mLastOwnerNameCacheConnection; // diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 2318dd601..9f5aa1b5f 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1606,7 +1606,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo } LLVector3d mypos = gAgent.getPositionGlobal(); - std::vector avatar_ids; + uuid_vec_t avatar_ids; LLWorld::instance().getAvatars(&avatar_ids, NULL, mypos, F32_MAX); for(S32 i = 0; i < rows; ++i) diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index 168dcc4f1..1329c60df 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -42,7 +42,6 @@ //#include "llviewertexturelist.h" #include "llsafehandle.h" -typedef std::set uuid_list_t; const F32 CACHE_REFRESH_TIME = 2.5f; class LLButton; @@ -172,7 +171,7 @@ public: static void onClickSet(void* data); static void onClickClear(void* data); static void onClickShow(void* data); - static void callbackAvatarPick(const std::vector& names, const std::vector& ids, void* data); + static void callbackAvatarPick(const std::vector& names, const uuid_vec_t& ids, void* data); static void finalizeAvatarPick(void* data); static void callbackHighlightTransferable(S32 option, void* userdata); static void onClickStartAuction(void*); diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index 4751b15e1..2e5a1b905 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -169,8 +169,8 @@ private: // enable/disable teleport destination coordinates void enableTeleportCoordsDisplay( bool enabled ); - std::vector mLandmarkAssetIDList; - std::vector mLandmarkItemIDList; + uuid_vec_t mLandmarkAssetIDList; + uuid_vec_t mLandmarkItemIDList; static const LLUUID sHomeID; diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 22b37e571..806452991 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1046,9 +1046,9 @@ void LLFolderView::removeCutItems() return; // Get the list of clipboard item uuids and iterate through them - std::vector objects; + uuid_vec_t objects; LLInventoryClipboard::instance().retrieve(objects); - for (std::vector::const_iterator iter = objects.begin(); + for (auto iter = objects.begin(); iter != objects.end(); ++iter) { diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index b4bd6770e..181322841 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -895,7 +895,7 @@ void LLGroupMgrGroupData::banMemberById(const LLUUID& participant_uuid) return; // can't ban group owner } - std::vector ids; + uuid_vec_t ids; ids.push_back(participant_uuid); LLGroupBanData ban_data; @@ -2083,7 +2083,7 @@ void GroupBanDataResponder::httpSuccess() void LLGroupMgr::sendGroupBanRequest( EBanRequestType request_type, const LLUUID& group_id, U32 ban_action, /* = BAN_NO_ACTION */ - const std::vector ban_list) /* = std::vector() */ + const uuid_vec_t ban_list) /* = uuid_vec_t() */ { LLViewerRegion* currentRegion = gAgent.getRegion(); if (!currentRegion) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index d06060692..b260d5402 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -213,7 +213,7 @@ private: bool send_start_session_messages( const LLUUID& temp_session_id, const LLUUID& other_participant_id, - const std::vector& ids, + const uuid_vec_t& ids, EInstantMessage dialog) { if ( dialog == IM_SESSION_GROUP_START ) @@ -282,7 +282,7 @@ LLFloaterIMPanel::LLFloaterIMPanel( const LLUUID& session_id, const LLUUID& other_participant_id, const EInstantMessage& dialog, - const std::vector& ids) : + const uuid_vec_t& ids) : LLFloater(log_label, LLRect(), log_label), mStartCallOnInitialize(false), mInputEditor(NULL), @@ -703,7 +703,7 @@ private: LLUUID mSessionID; }; -bool LLFloaterIMPanel::inviteToSession(const std::vector& ids) +bool LLFloaterIMPanel::inviteToSession(const uuid_vec_t& ids) { LLViewerRegion* region = gAgent.getRegion(); if (!region) @@ -951,9 +951,7 @@ BOOL LLFloaterIMPanel::dropCallingCard(LLInventoryItem* item, BOOL drop) { if (drop) { - std::vector ids; - ids.push_back(item->getCreatorUUID()); - inviteToSession(ids); + inviteToSession({ item->getCreatorUUID() }); } return true; } @@ -980,7 +978,7 @@ BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop) } else if(drop) { - std::vector ids; + uuid_vec_t ids; for(S32 i = 0; i < count; ++i) { ids.push_back(items.at(i)->getCreatorUUID()); diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index 6a4dffc81..832c0ddee 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -60,7 +60,7 @@ public: const LLUUID& session_id, const LLUUID& target_id, const EInstantMessage& dialog, - const std::vector& ids = std::vector()); + const uuid_vec_t& ids = uuid_vec_t()); virtual ~LLFloaterIMPanel(); void onAvatarNameLookup(const LLAvatarName& avatar_name); @@ -77,7 +77,7 @@ public: // add target ids to the session. // Return TRUE if successful, otherwise FALSE. - bool inviteToSession(const std::vector& agent_ids); + bool inviteToSession(const uuid_vec_t& agent_ids); void addHistoryLine(const std::string &utf8msg, LLColor4 incolor = LLColor4::white, diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 1fe90565e..d56cf58c7 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -617,7 +617,7 @@ LLUUID LLIMMgr::addSession( LLFloaterIMPanel* floater = findFloaterBySession(session_id); if(!floater) { - std::vector ids; + uuid_vec_t ids; ids.push_back(other_participant_id); floater = createFloater(session_id, other_participant_id, name, dialog, ids, true); @@ -661,7 +661,7 @@ LLUUID LLIMMgr::addSession( const std::string& name, EInstantMessage dialog, const LLUUID& other_participant_id, - const std::vector& ids) + const uuid_vec_t& ids) { if (0 == ids.size()) { @@ -1028,7 +1028,7 @@ LLFloaterIMPanel* LLIMMgr::createFloater( const LLUUID& other_participant_id, const std::string& session_label, const EInstantMessage& dialog, - const std::vector& ids, + const uuid_vec_t& ids, bool user_initiated) { if (session_id.isNull()) @@ -1088,7 +1088,7 @@ std::string LLIMMgr::getOfflineMessage(const LLUUID& id) void LLIMMgr::noteOfflineUsers( LLFloaterIMPanel* floater, - const std::vector& ids) + const uuid_vec_t& ids) { if(ids.empty()) { @@ -1113,7 +1113,7 @@ void LLIMMgr::noteOfflineUsers( } void LLIMMgr::noteMutedUsers(LLFloaterIMPanel* floater, - const std::vector& ids) + const uuid_vec_t& ids) { // Don't do this if we don't have a mute list. LLMuteList *ml = LLMuteList::getInstance(); diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index a138cae7d..be10c57ff 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -92,7 +92,7 @@ public: LLUUID addSession(const std::string& name, EInstantMessage dialog, const LLUUID& other_participant_id, - const std::vector& ids); + const uuid_vec_t& ids); // Creates a P2P session with the requisite handle for responding to voice calls LLUUID addP2PSession(const std::string& name, @@ -199,15 +199,15 @@ private: const LLUUID& target_id, const std::string& name, const EInstantMessage& dialog, - const std::vector& ids = std::vector(), + const uuid_vec_t& ids = uuid_vec_t(), bool user_initiated = false); // This simple method just iterates through all of the ids, and // prints a simple message if they are not online. Used to help // reduce 'hello' messages to the linden employees unlucky enough // to have their calling card in the default inventory. - void noteOfflineUsers(LLFloaterIMPanel* panel, const std::vector& ids); - void noteMutedUsers(LLFloaterIMPanel* panel, const std::vector& ids); + void noteOfflineUsers(LLFloaterIMPanel* panel, const uuid_vec_t& ids); + void noteMutedUsers(LLFloaterIMPanel* panel, const uuid_vec_t& ids); void processIMTypingCore(const LLIMInfo* im_info, BOOL typing); @@ -219,7 +219,7 @@ private: // the user should be notified that to be able to see this message the option should be OFF. // This set stores session IDs in which user was notified. Need to store this IDs so that the user // be notified only one time per session with non-friend. - typedef std::set notified_non_friend_sessions_t; + typedef uuid_set_t notified_non_friend_sessions_t; notified_non_friend_sessions_t mNotifiedNonFriendSessions; // An IM has been received that you haven't seen yet. diff --git a/indra/newview/llinventoryactions.cpp b/indra/newview/llinventoryactions.cpp index 07313d1c5..e06b40724 100644 --- a/indra/newview/llinventoryactions.cpp +++ b/indra/newview/llinventoryactions.cpp @@ -520,7 +520,7 @@ struct LLBeginIMSession : public inventory_panel_listener_t std::string name; static int session_num = 1; - std::vector members; + uuid_vec_t members; EInstantMessage type = IM_SESSION_CONFERENCE_START; // [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 14278f881..5326a64d3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -531,7 +531,7 @@ BOOL LLInvFVBridge::isClipboardPasteable() const // In normal mode, we need to check each element of the clipboard to know if we can paste or not LLInventoryPanel* panel = dynamic_cast(mInventoryPanel.get()); - std::vector objects; + uuid_vec_t objects; LLInventoryClipboard::instance().retrieve(objects); S32 count = objects.size(); for(S32 i = 0; i < count; i++) @@ -573,7 +573,7 @@ bool LLInvFVBridge::isClipboardPasteableAsCopy() const // In copy mode, we need to check each element of the clipboard to know if it's a link LLInventoryPanel* panel = dynamic_cast(mInventoryPanel.get()); - std::vector objects; + uuid_vec_t objects; LLInventoryClipboard::instance().retrieve(objects); const S32 count = objects.size(); for(S32 i = 0; i < count; i++) @@ -611,7 +611,7 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const return FALSE; } - std::vector objects; + uuid_vec_t objects; LLInventoryClipboard::instance().retrieve(objects); S32 count = objects.size(); for(S32 i = 0; i < count; i++) @@ -2217,7 +2217,7 @@ BOOL LLFolderBridge::isClipboardPasteable() const return FALSE; } - std::vector objects; + uuid_vec_t objects; LLInventoryClipboard::instance().retrieve(objects); const LLViewerInventoryCategory *current_cat = getCategory(); @@ -2265,7 +2265,7 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const const BOOL is_in_friend_folder = LLFriendCardsManager::instance().isCategoryInFriendFolder(current_cat); */ const LLUUID ¤t_cat_id = current_cat->getUUID(); - std::vector objects; + uuid_vec_t objects; LLInventoryClipboard::instance().retrieve(objects); S32 count = objects.size(); for (S32 i = 0; i < count; i++) @@ -2905,10 +2905,10 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask) { if (!mFolderAdded) { - const std::set& changed_items = gInventory.getChangedIDs(); + const uuid_set_t& changed_items = gInventory.getChangedIDs(); - std::set::const_iterator id_it = changed_items.begin(); - std::set::const_iterator id_end = changed_items.end(); + auto id_it = changed_items.begin(); + auto id_end = changed_items.end(); for (;id_it != id_end; ++id_it) { if ((*id_it) == mCatID) @@ -3370,9 +3370,9 @@ void LLFolderBridge::pasteFromClipboard(bool only_copies) if (clipboard.isCutMode()) { //Items are not removed from folder on "cut", so we need update listing folder on "paste" operation - std::vector objects; + uuid_vec_t objects; clipboard.retrieve(objects); - for (std::vector::const_iterator iter = objects.begin(); iter != objects.end(); ++iter) + for (auto iter = objects.begin(); iter != objects.end(); ++iter) { const LLUUID& item_id = (*iter); if(gInventory.isObjectDescendentOf(item_id, marketplacelistings_id) && (LLMarketplaceData::instance().isInActiveFolder(item_id) || @@ -3420,7 +3420,7 @@ void LLFolderBridge::perform_pasteFromClipboard(bool only_copies) const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - std::vector objects; + uuid_vec_t objects; LLInventoryClipboard::instance().retrieve(objects); LLViewerInventoryCategory* dest_folder = getCategory(); @@ -3429,7 +3429,7 @@ void LLFolderBridge::perform_pasteFromClipboard(bool only_copies) std::string error_msg; const LLViewerInventoryCategory* master_folder = model->getFirstDescendantOf(marketplacelistings_id, mUUID); int index = 0; - for (std::vector::const_iterator iter = objects.begin(); iter != objects.end(); ++iter) + for (auto iter = objects.begin(); iter != objects.end(); ++iter) { const LLUUID& item_id = (*iter); LLInventoryItem *item = model->getItem(item_id); @@ -3456,7 +3456,7 @@ void LLFolderBridge::perform_pasteFromClipboard(bool only_copies) else { // Check that all items can be moved into that folder : for the moment, only stock folder mismatch is checked - for (std::vector::const_iterator iter = objects.begin(); iter != objects.end(); ++iter) + for (auto iter = objects.begin(); iter != objects.end(); ++iter) { const LLUUID& item_id = (*iter); LLInventoryItem *item = model->getItem(item_id); @@ -3475,7 +3475,7 @@ void LLFolderBridge::perform_pasteFromClipboard(bool only_copies) const LLUUID parent_id(mUUID); - for (std::vector::const_iterator iter = objects.begin(); + for (auto iter = objects.begin(); iter != objects.end(); ++iter) { @@ -3629,9 +3629,9 @@ void LLFolderBridge::pasteLinkFromClipboard() const LLUUID parent_id(mUUID); - std::vector objects; + uuid_vec_t objects; LLInventoryClipboard::instance().retrieve(objects); - for (std::vector::const_iterator iter = objects.begin(); + for (auto iter = objects.begin(); iter != objects.end(); ++iter) { diff --git a/indra/newview/llinventoryclipboard.cpp b/indra/newview/llinventoryclipboard.cpp index 2a6fe947d..fd121ee01 100644 --- a/indra/newview/llinventoryclipboard.cpp +++ b/indra/newview/llinventoryclipboard.cpp @@ -62,7 +62,7 @@ void LLInventoryClipboard::store(const LLUUID& object) mObjects.push_back(object); } -void LLInventoryClipboard::store(const std::vector& inv_objects) +void LLInventoryClipboard::store(const uuid_vec_t& inv_objects) { reset(); S32 count = inv_objects.size(); @@ -82,7 +82,7 @@ void LLInventoryClipboard::cut(const LLUUID& object) mCutMode = true; add(object); } -void LLInventoryClipboard::retrieve(std::vector& inv_objects) const +void LLInventoryClipboard::retrieve(uuid_vec_t& inv_objects) const { inv_objects.clear(); S32 count = mObjects.size(); @@ -107,7 +107,7 @@ BOOL LLInventoryClipboard::hasContents() const // returns true if the input uuid is in the list of clipboard objects. bool LLInventoryClipboard::isOnClipboard(const LLUUID& object) const { - std::vector::const_iterator iter = std::find(mObjects.begin(), mObjects.end(), object); + auto iter = std::find(mObjects.begin(), mObjects.end(), object); return (iter != mObjects.end()); } diff --git a/indra/newview/llinventoryclipboard.h b/indra/newview/llinventoryclipboard.h index 35a5c6fcf..e6d493882 100644 --- a/indra/newview/llinventoryclipboard.h +++ b/indra/newview/llinventoryclipboard.h @@ -51,12 +51,12 @@ public: void store(const LLUUID& object); // this method stores an array of objects - void store(const std::vector& inventory_objects); + void store(const uuid_vec_t& inventory_objects); void cut(const LLUUID& object); // this method gets the objects in the clipboard by copying them // into the array provided. - void retrieve(std::vector& inventory_objects) const; + void retrieve(uuid_vec_t& inventory_objects) const; // this method empties out the clipboard void reset(); @@ -72,7 +72,7 @@ public: protected: static LLInventoryClipboard sInstance; - std::vector mObjects; + uuid_vec_t mObjects; bool mCutMode; public: diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 2d3c58bb3..d23ad4417 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -1507,7 +1507,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_ gInventory.getDirectDescendentsOf(cat->getUUID(),cat_array,item_array); // We use a composite (type,permission) key on that map to store UUIDs of items of same (type,permissions) - std::map > items_vector; + std::map items_vector; // Parse the items and create vectors of item UUIDs sorting copyable items and stock items of various types bool has_bad_items = false; @@ -1613,7 +1613,7 @@ bool validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_ ((folder_type != LLFolderType::FT_MARKETPLACE_STOCK) && (unique_key != default_key))) { // Create one folder per vector at the right depth and of the right type - std::map >::iterator items_vector_it = items_vector.begin(); + auto items_vector_it = items_vector.begin(); while (items_vector_it != items_vector.end()) { // Create a new folder diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index f4c374108..4b82be393 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -249,7 +249,7 @@ public: LLInventoryItem* item); protected: - std::set mSeen; + uuid_set_t mSeen; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -492,7 +492,7 @@ public: void setApply(BOOL apply); void clearOpenFolders() { mOpenFolders.clear(); } protected: - std::set mOpenFolders; + uuid_set_t mOpenFolders; BOOL mApply; }; diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 30a3ca092..4a7dea11f 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -95,7 +95,7 @@ public: virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); protected: LLInventoryModel* mModel; - std::set mCachedCatIDs; + uuid_set_t mCachedCatIDs; }; bool LLCanCache::operator()(LLInventoryCategory* cat, LLInventoryItem* item) @@ -420,7 +420,7 @@ void LLInventoryModel::unlockDirectDescendentArrays(const LLUUID& cat_id) void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::EType type) { // Make a list of folders that are not "main_id" and are of "type" - std::vector folder_ids; + uuid_vec_t folder_ids; for (cat_map_t::iterator cit = mCategoryMap.begin(); cit != mCategoryMap.end(); ++cit) { LLViewerInventoryCategory* cat = cit->second; @@ -431,7 +431,7 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E } // Iterate through those folders - for (std::vector::iterator folder_ids_it = folder_ids.begin(); folder_ids_it != folder_ids.end(); ++folder_ids_it) + for (auto folder_ids_it = folder_ids.begin(); folder_ids_it != folder_ids.end(); ++folder_ids_it) { LLUUID folder_id = (*folder_ids_it); @@ -444,12 +444,12 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E // Note : we get the list of UUIDs and iterate on them instead of iterating directly on item_array_t // elements. This is because moving elements modify the maps and, consequently, invalidate iterators on them. // This "gather and iterate" method is verbose but resilient. - std::vector list_uuids; + uuid_vec_t list_uuids; for (item_array_t::const_iterator it = items->begin(); it != items->end(); ++it) { list_uuids.push_back((*it)->getUUID()); } - for (std::vector::const_iterator it = list_uuids.begin(); it != list_uuids.end(); ++it) + for (auto it = list_uuids.begin(); it != list_uuids.end(); ++it) { LLViewerInventoryItem* item = getItem(*it); changeItemParent(item, main_id, TRUE); @@ -461,7 +461,7 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E { list_uuids.push_back((*it)->getUUID()); } - for (std::vector::const_iterator it = list_uuids.begin(); it != list_uuids.end(); ++it) + for (auto it = list_uuids.begin(); it != list_uuids.end(); ++it) { LLViewerInventoryCategory* cat = getCategory(*it); changeCategoryParent(cat, main_id, TRUE); @@ -2081,7 +2081,7 @@ bool LLInventoryModel::loadSkeleton( // does not match, invalidate the version. S32 count = categories.size(); cat_set_t::iterator not_cached = temp_cats.end(); - std::set cached_ids; + uuid_set_t cached_ids; for(S32 i = 0; i < count; ++i) { LLViewerInventoryCategory* cat = categories[i]; @@ -2117,7 +2117,7 @@ bool LLInventoryModel::loadSkeleton( } // go ahead and add the cats returned during the download - std::set::const_iterator not_cached_id = cached_ids.end(); + auto not_cached_id = cached_ids.end(); cached_category_count = cached_ids.size(); for(cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it) { diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 7e896b7cb..f8c5e81f3 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -76,7 +76,7 @@ public: typedef std::vector > cat_array_t; typedef std::vector > item_array_t; - typedef std::set changed_items_t; + typedef uuid_set_t changed_items_t; class FetchItemHttpHandler : public LLHTTPClient::ResponderWithResult { diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index c9c91de85..b1b9858cf 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -589,7 +589,7 @@ void LLInventoryCategoriesObserver::changed(U32 mask) if (!mCategoryMap.size()) return; - std::vector deleted_categories_ids; + uuid_vec_t deleted_categories_ids; for (category_map_t::iterator iter = mCategoryMap.begin(); iter != mCategoryMap.end(); @@ -665,7 +665,7 @@ void LLInventoryCategoriesObserver::changed(U32 mask) } // Remove deleed categories from the list - for (std::vector::iterator deleted_id = deleted_categories_ids.begin(); deleted_id != deleted_categories_ids.end(); ++deleted_id) + for (auto deleted_id = deleted_categories_ids.begin(); deleted_id != deleted_categories_ids.end(); ++deleted_id) { removeCategory(*deleted_id); } diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index d420490a8..afc4bebd0 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -178,7 +178,7 @@ protected: virtual void onAssetAdded(const LLUUID& asset_id) {} virtual void done() = 0; - typedef std::vector item_ref_t; + typedef uuid_vec_t item_ref_t; item_ref_t mAddedItems; item_ref_t mWatchedAssets; diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h index 4983af562..057c8d5e7 100644 --- a/indra/newview/lllandmarklist.h +++ b/indra/newview/lllandmarklist.h @@ -68,7 +68,7 @@ protected: typedef std::map landmark_list_t; landmark_list_t mList; - typedef std::set landmark_bad_list_t; + typedef uuid_set_t landmark_bad_list_t; landmark_bad_list_t mBadList; typedef std::map landmark_requested_list_t; diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 10efa114c..b2ee4fba4 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -1123,10 +1123,10 @@ void LLMarketplaceInventoryObserver::changed(U32 mask) // When things are added to the marketplace, we might need to re-validate and fix the containing listings if (mask & LLInventoryObserver::ADD) { - const std::set& changed_items = gInventory.getChangedIDs(); + const uuid_set_t& changed_items = gInventory.getChangedIDs(); - std::set::const_iterator id_it = changed_items.begin(); - std::set::const_iterator id_end = changed_items.end(); + auto id_it = changed_items.begin(); + auto id_end = changed_items.end(); // First, count the number of items in this list... S32 count = 0; for (;id_it != id_end; ++id_it) @@ -1159,10 +1159,10 @@ void LLMarketplaceInventoryObserver::changed(U32 mask) if (mask & (LLInventoryObserver::INTERNAL | LLInventoryObserver::STRUCTURE)) { - const std::set& changed_items = gInventory.getChangedIDs(); + const uuid_set_t& changed_items = gInventory.getChangedIDs(); - std::set::const_iterator id_it = changed_items.begin(); - std::set::const_iterator id_end = changed_items.end(); + auto id_it = changed_items.begin(); + auto id_end = changed_items.end(); for (;id_it != id_end; ++id_it) { LLInventoryObject* obj = gInventory.getObject(*id_it); @@ -1878,7 +1878,7 @@ bool LLMarketplaceData::isUpdating(const LLUUID& folder_id, S32 depth) else { const LLUUID marketplace_listings_uuid = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); - std::set::iterator it = mPendingUpdateSet.find(marketplace_listings_uuid); + auto it = mPendingUpdateSet.find(marketplace_listings_uuid); if (it != mPendingUpdateSet.end()) { // If we're waiting for data for the marketplace listings root, we are in the updating process for all @@ -1896,7 +1896,7 @@ bool LLMarketplaceData::isUpdating(const LLUUID& folder_id, S32 depth) void LLMarketplaceData::setUpdating(const LLUUID& folder_id, bool isUpdating) { - std::set::iterator it = mPendingUpdateSet.find(folder_id); + auto it = mPendingUpdateSet.find(folder_id); if (it != mPendingUpdateSet.end()) { mPendingUpdateSet.erase(it); diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h index 8aa4dfad8..91a741018 100644 --- a/indra/newview/llmarketplacefunctions.h +++ b/indra/newview/llmarketplacefunctions.h @@ -271,7 +271,7 @@ private: // Update data U32 mMarketPlaceDataFetched; status_updated_signal_t* mDataFetchedSignal; - std::set mPendingUpdateSet; + uuid_set_t mPendingUpdateSet; // Listing folders waiting for validation typedef std::map waiting_list_t; diff --git a/indra/newview/llmaterialmgr.h b/indra/newview/llmaterialmgr.h index e83f1f4e0..7e7095529 100644 --- a/indra/newview/llmaterialmgr.h +++ b/indra/newview/llmaterialmgr.h @@ -111,7 +111,7 @@ protected: typedef boost::unordered_map get_callback_te_map_t; get_callback_te_map_t mGetTECallbacks; - typedef std::set getall_queue_t; + typedef uuid_set_t getall_queue_t; getall_queue_t mGetAllQueue; getall_queue_t mGetAllRequested; typedef std::map getall_pending_map_t; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 28303be2c..44599742d 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -645,18 +645,14 @@ void LLMeshRepoThread::runQueue(std::deque& set, std::function fn) +void LLMeshRepoThread::runSet(uuid_set_t& set, std::function fn) { - std::set incomplete; - for (std::set::iterator iter = set.begin(); iter != set.end(); ++iter) + for (auto iter = set.begin(); iter != set.end();) { - LLUUID mesh_id = *iter; - if (!fn(mesh_id)) - { - incomplete.insert(mesh_id); - } + if (fn(*iter)) + iter = set.erase(iter); + else ++iter; } - set = incomplete; } void LLMeshRepoThread::run() @@ -2694,7 +2690,7 @@ void LLMeshRepository::notifySkinInfoReceived(LLMeshSkinInfo& info) skin_load_map::iterator iter = mLoadingSkins.find(info.mMeshID); if (iter != mLoadingSkins.end()) { - for (std::set::iterator obj_id = iter->second.begin(); obj_id != iter->second.end(); ++obj_id) + for (auto obj_id = iter->second.begin(); obj_id != iter->second.end(); ++obj_id) { LLVOVolume* vobj = (LLVOVolume*) gObjectList.findObject(*obj_id); if (vobj) @@ -2834,7 +2830,7 @@ void LLMeshRepository::fetchPhysicsShape(const LLUUID& mesh_id) { LLMutexLock lock(mMeshMutex); //add volume to list of loading meshes - std::set::iterator iter = mLoadingPhysicsShapes.find(mesh_id); + auto iter = mLoadingPhysicsShapes.find(mesh_id); if (iter == mLoadingPhysicsShapes.end()) { //no request pending for this skin info mLoadingPhysicsShapes.insert(mesh_id); @@ -2862,7 +2858,7 @@ LLModel::Decomposition* LLMeshRepository::getDecomposition(const LLUUID& mesh_id { LLMutexLock lock(mMeshMutex); //add volume to list of loading meshes - std::set::iterator iter = mLoadingDecompositions.find(mesh_id); + auto iter = mLoadingDecompositions.find(mesh_id); if (iter == mLoadingDecompositions.end()) { //no request pending for this skin info mLoadingDecompositions.insert(mesh_id); diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 9226c3c00..62666bc65 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -259,16 +259,16 @@ public: }; //set of requested skin info - std::set mSkinRequests; + uuid_set_t mSkinRequests; //queue of completed skin info requests std::queue mSkinInfoQ; //set of requested decompositions - std::set mDecompositionRequests; + uuid_set_t mDecompositionRequests; //set of requested physics shapes - std::set mPhysicsShapeRequests; + uuid_set_t mPhysicsShapeRequests; //queue of completed Decomposition info requests std::queue mDecompositionQ; @@ -295,7 +295,7 @@ public: ~LLMeshRepoThread(); void runQueue(std::deque, F32> >& queue, U32& count, S32& active_requests); - void runSet(std::set& set, std::function fn); + void runSet(uuid_set_t& set, std::function fn); void pushHeaderRequest(const LLVolumeParams& mesh_params, F32 delay = 0) { std::shared_ptr req; @@ -572,20 +572,20 @@ public: std::vector mPendingRequests; //list of mesh ids awaiting skin info - typedef std::map > skin_load_map; + typedef std::map skin_load_map; skin_load_map mLoadingSkins; //list of mesh ids that need to send skin info fetch requests std::queue mPendingSkinRequests; //list of mesh ids awaiting decompositions - std::set mLoadingDecompositions; + uuid_set_t mLoadingDecompositions; //list of mesh ids that need to send decomposition fetch requests std::queue mPendingDecompositionRequests; //list of mesh ids awaiting physics shapes - std::set mLoadingPhysicsShapes; + uuid_set_t mLoadingPhysicsShapes; //list of mesh ids that need to send physics shape fetch requests std::queue mPendingPhysicsShapeRequests; diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp index 2080117c5..aa7f55196 100644 --- a/indra/newview/llpanelgroupbulkban.cpp +++ b/indra/newview/llpanelgroupbulkban.cpp @@ -129,7 +129,7 @@ void LLPanelGroupBulkBan::submit() (*(mImplementation->mCloseCallback))(mImplementation->mCloseCallbackUserData); return; } - std::vector banned_agent_list; + uuid_vec_t banned_agent_list; std::vector agents = mImplementation->mBulkAgentList->getAllData(); std::vector::iterator iter = agents.begin(); for(;iter != agents.end(); ++iter) @@ -153,7 +153,7 @@ void LLPanelGroupBulkBan::submit() std::vector banned_avatar_names; std::vector out_of_limit_names; bool banning_self = FALSE; - std::vector::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgent.getID()); + auto conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgent.getID()); if (conflict != banned_agent_list.end()) { banned_agent_list.erase(conflict); @@ -164,7 +164,7 @@ void LLPanelGroupBulkBan::submit() for (const LLGroupMgrGroupData::ban_list_t::value_type& group_ban_pair : group_datap->mBanList) { const LLUUID& group_ban_agent_id = group_ban_pair.first; - std::vector::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), group_ban_agent_id); + auto conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), group_ban_agent_id); if (conflict != banned_agent_list.end()) { LLAvatarName av_name; @@ -182,8 +182,8 @@ void LLPanelGroupBulkBan::submit() // Otherwise we have a possibility of cutting more then we need to. if (banned_agent_list.size() > GB_MAX_BANNED_AGENTS - group_datap->mBanList.size()) { - std::vector::iterator exeedes_limit = banned_agent_list.begin() + GB_MAX_BANNED_AGENTS - group_datap->mBanList.size(); - for (std::vector::iterator itor = exeedes_limit ; + auto exeedes_limit = banned_agent_list.begin() + GB_MAX_BANNED_AGENTS - group_datap->mBanList.size(); + for (auto itor = exeedes_limit ; itor != banned_agent_list.end(); ++itor) { LLAvatarName av_name; diff --git a/indra/newview/llpanelgroupbulkimpl.h b/indra/newview/llpanelgroupbulkimpl.h index 235eeb8f9..ec2e06b47 100644 --- a/indra/newview/llpanelgroupbulkimpl.h +++ b/indra/newview/llpanelgroupbulkimpl.h @@ -78,7 +78,7 @@ public: std::string mBanLimitFail; std::string mCannotBanYourself; - std::set mInviteeIDs; + uuid_set_t mInviteeIDs; void (*mCloseCallback)(void* data); void* mCloseCallbackUserData; diff --git a/indra/newview/llsculptidsize.h b/indra/newview/llsculptidsize.h index 87ee417b8..678155e1d 100644 --- a/indra/newview/llsculptidsize.h +++ b/indra/newview/llsculptidsize.h @@ -127,7 +127,7 @@ public: private: container mSizeInfo; - typedef std::set std_LLUUID; + typedef uuid_set_t std_LLUUID; std_LLUUID mMarkAsUnloaded; }; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 6fa3882ea..b1f9bfe05 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -7419,8 +7419,7 @@ S32 LLObjectSelection::getSelectedObjectRenderCost() { S32 cost = 0; LLVOVolume::texture_cost_t textures; - typedef std::set uuid_list_t; - uuid_list_t computed_objects; + uuid_set_t computed_objects; typedef std::list > child_list_t; typedef const child_list_t const_child_list_t; diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index ced6d48ee..64125b1ec 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -564,12 +564,12 @@ void LLSpeakerMgr::updateSpeakerList() // Are we bound to the currently active voice channel? if ((!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) { - std::set participants; + uuid_set_t participants; LLVoiceClient::getInstance()->getParticipantList(participants); // If we are, add all voice client participants to our list of known speakers std::vector speakers; speakers.reserve(participants.size()); - for (std::set::iterator participant_it = participants.begin(); participant_it != participants.end(); ++participant_it) + for (auto participant_it = participants.begin(); participant_it != participants.end(); ++participant_it) { speakers.emplace_back( *participant_it, diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index ed878a02f..077b6a8c7 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1064,9 +1064,9 @@ S32 LLTextureCache::openAndReadEntry(const LLUUID& id, Entry& entry, bool create else { // Look for a still valid entry in the LRU - for (std::set::iterator iter2 = mLRU.begin(); iter2 != mLRU.end();) + for (auto iter2 = mLRU.begin(); iter2 != mLRU.end();) { - std::set::iterator curiter2 = iter2++; + auto curiter2 = iter2++; LLUUID oldid = *curiter2; // Erase entry from LRU regardless mLRU.erase(curiter2); diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 6aeea41a4..49b2eabc2 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -193,7 +193,7 @@ private: std::string mHeaderDataFileName; EntriesInfo mHeaderEntriesInfo; std::set mFreeList; // deleted entries - std::set mLRU; + uuid_set_t mLRU; typedef std::map id_map_t; id_map_t mHeaderIDMap; diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 5de76de4d..41b0616e9 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -163,10 +163,10 @@ private: map_t mRequestMap; // Set of requests that require network data - typedef std::set queue_t; + typedef uuid_set_t queue_t; queue_t mNetworkQueue; queue_t mHTTPTextureQueue; - typedef std::map > cancel_queue_t; + typedef std::map cancel_queue_t; cancel_queue_t mCancelQueue; LLTextureInfo mTextureInfo; diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index c8f7334b8..78aaae39d 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -271,7 +271,7 @@ void LLCategoryDropDescendentsObserver::done() S32 count = items.size(); if(count) { - std::set unique_ids; + uuid_set_t unique_ids; for(S32 i = 0; i < count; ++i) { unique_ids.insert(items.get(i)->getUUID()); @@ -472,7 +472,7 @@ void LLToolDragAndDrop::beginMultiDrag( // find categories (i.e. inventory folders) in the cargo. LLInventoryCategory* cat = NULL; S32 count = llmin(cargo_ids.size(), types.size()); - std::set cat_ids; + uuid_set_t cat_ids; for(S32 i = 0; i < count; ++i) { cat = gInventory.getCategory(cargo_ids[i]); diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h index 5c62dbd1d..1dc56ceed 100644 --- a/indra/newview/lltracker.h +++ b/indra/newview/lltracker.h @@ -143,8 +143,8 @@ protected: std::string mTrackedLandmarkName; LLUUID mTrackedLandmarkAssetID; LLUUID mTrackedLandmarkItemID; - std::vector mLandmarkAssetIDList; - std::vector mLandmarkItemIDList; + uuid_vec_t mLandmarkAssetIDList; + uuid_vec_t mLandmarkItemIDList; BOOL mHasReachedLandmark; BOOL mHasLandmarkPosition; BOOL mLandmarkHasBeenVisited; diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index b19342f26..e9b544df4 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1714,7 +1714,7 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) LLInventoryModel::item_array_t* items; // Get the list of direct descendants in tha categoy passed as argument gInventory.getDirectDescendentsOf(id, categories, items); - std::vector list_uuids; + uuid_vec_t list_uuids; // Make a unique list with all the UUIDs of the direct descendants (items and categories are not treated differently) // Note: we need to do that shallow copy as purging things will invalidate the categories or items lists for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); it != categories->end(); ++it) @@ -1726,7 +1726,7 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) list_uuids.push_back((*it)->getUUID()); } // Iterate through the list and only purge the UUIDs that are not on the clipboard - for (std::vector::const_iterator it = list_uuids.begin(); it != list_uuids.end(); ++it) + for (auto it = list_uuids.begin(); it != list_uuids.end(); ++it) { if (!LLInventoryClipboard::instance().isOnClipboard(*it)) { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8df492288..919fdf45e 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -719,11 +719,11 @@ bool join_group_response(const LLSD& notification, const LLSD& response) return false; } -static void highlight_inventory_objects_in_panel(const std::vector& items, LLInventoryPanel *inventory_panel) +static void highlight_inventory_objects_in_panel(const uuid_vec_t& items, LLInventoryPanel *inventory_panel) { if (NULL == inventory_panel) return; - for (std::vector::const_iterator item_iter = items.begin(); + for (auto item_iter = items.begin(); item_iter != items.end(); ++item_iter) { @@ -881,7 +881,7 @@ private: } LLHandle mActivePanel; - typedef boost::unordered_set selected_items_t; + typedef uuid_set_t selected_items_t; selected_items_t mSelectedItems; /** @@ -951,18 +951,16 @@ void LLViewerInventoryMoveObserver::changed(U32 mask) if((mask & (LLInventoryObserver::STRUCTURE)) != 0) { - const std::set& changed_items = gInventory.getChangedIDs(); + const uuid_set_t& changed_items = gInventory.getChangedIDs(); - std::set::const_iterator id_it = changed_items.begin(); - std::set::const_iterator id_end = changed_items.end(); + auto id_it = changed_items.begin(); + auto id_end = changed_items.end(); for (;id_it != id_end; ++id_it) { if ((*id_it) == mObjectID) { active_panel->clearSelection(); - std::vector items; - items.push_back(mObjectID); - highlight_inventory_objects_in_panel(items, active_panel); + highlight_inventory_objects_in_panel({mObjectID}, active_panel); active_panel->getRootFolder()->scrollToShowSelection(); gInventory.removeObserver(this); @@ -8016,9 +8014,7 @@ bool handle_lure_callback(const LLSD& notification, const LLSD& response) void handle_lure(const LLUUID& invitee) { - std::vector ids; - ids.push_back(invitee); - handle_lure(ids); + handle_lure(uuid_vec_t{invitee}); } // Prompt for a message to the invited user. diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 0f45eea51..f0ca03ab7 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1137,7 +1137,7 @@ void LLViewerObjectList::fetchObjectCosts() U32 object_index = 0; for ( - std::set::iterator iter = mStaleObjectCost.begin(); + auto iter = mStaleObjectCost.begin(); iter != mStaleObjectCost.end(); ) { @@ -1195,7 +1195,7 @@ void LLViewerObjectList::fetchPhysicsFlags() U32 object_index = 0; for ( - std::set::iterator iter = mStalePhysicsFlags.begin(); + auto iter = mStalePhysicsFlags.begin(); iter != mStalePhysicsFlags.end(); ) { diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 3f96c11bf..aa86c5c5c 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -217,18 +217,18 @@ public: vobj_list_t mMapObjects; - std::set mDeadObjects; + uuid_set_t mDeadObjects; boost::unordered_map > mUUIDObjectMap; boost::unordered_map > mUUIDAvatarMap; //set of objects that need to update their cost - std::set mStaleObjectCost; - std::set mPendingObjectCost; + uuid_set_t mStaleObjectCost; + uuid_set_t mPendingObjectCost; //set of objects that need to update their physics flags - std::set mStalePhysicsFlags; - std::set mPendingPhysicsFlags; + uuid_set_t mStalePhysicsFlags; + uuid_set_t mPendingPhysicsFlags; std::vector mDebugBeacons; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 7447fb440..72ef3aafe 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1294,7 +1294,7 @@ public: S32 you_index = input["body"]["Index"][0]["You" ].asInteger(); std::vector& avatar_locs = region->mMapAvatars; - std::vector& avatar_ids = region->mMapAvatarIDs; + uuid_vec_t& avatar_ids = region->mMapAvatarIDs; std::list map_avids(avatar_ids.begin(), avatar_ids.end()); avatar_locs.clear(); avatar_ids.clear(); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a5d8cf120..cbf54b892 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -653,7 +653,7 @@ public: } } } - for(std::set::iterator it = gObjectList.mDeadObjects.begin();it!=gObjectList.mDeadObjects.end();++it) + for(auto it = gObjectList.mDeadObjects.begin();it!=gObjectList.mDeadObjects.end();++it) { LLViewerObject *obj = gObjectList.findObject(*it); if(obj && obj->isAvatar()) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 578f3a235..0d0cdcaca 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5743,9 +5743,9 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel) return 6; } -bool LLVOAvatar::allTexturesCompletelyDownloaded(std::set& ids) const +bool LLVOAvatar::allTexturesCompletelyDownloaded(uuid_set_t& ids) const { - for (std::set::const_iterator it = ids.begin(); it != ids.end(); ++it) + for (auto it = ids.begin(); it != ids.end(); ++it) { LLViewerFetchedTexture *imagep = gTextureList.findImage(*it); if (imagep && imagep->getDiscardLevel()!=0) @@ -5758,14 +5758,14 @@ bool LLVOAvatar::allTexturesCompletelyDownloaded(std::set& ids) const bool LLVOAvatar::allLocalTexturesCompletelyDownloaded() const { - std::set local_ids; + uuid_set_t local_ids; collectLocalTextureUUIDs(local_ids); return allTexturesCompletelyDownloaded(local_ids); } bool LLVOAvatar::allBakedTexturesCompletelyDownloaded() const { - std::set baked_ids; + uuid_set_t baked_ids; collectBakedTextureUUIDs(baked_ids); return allTexturesCompletelyDownloaded(baked_ids); } @@ -5777,9 +5777,9 @@ void LLVOAvatar::bakedTextureOriginCounts(S32 &sb_count, // server-bake, has ori { sb_count = host_count = both_count = neither_count = 0; - std::set baked_ids; + uuid_set_t baked_ids; collectBakedTextureUUIDs(baked_ids); - for (std::set::const_iterator it = baked_ids.begin(); it != baked_ids.end(); ++it) + for (auto it = baked_ids.begin(); it != baked_ids.end(); ++it) { LLViewerFetchedTexture *imagep = gTextureList.findImage(*it); bool has_url = false, has_host = false; @@ -5802,9 +5802,9 @@ std::string LLVOAvatar::bakedTextureOriginInfo() { std::string result; - std::set baked_ids; + uuid_set_t baked_ids; collectBakedTextureUUIDs(baked_ids); - for (std::set::const_iterator it = baked_ids.begin(); it != baked_ids.end(); ++it) + for (auto it = baked_ids.begin(); it != baked_ids.end(); ++it) { LLViewerFetchedTexture *imagep = gTextureList.findImage(*it); bool has_url = false, has_host = false; @@ -5830,10 +5830,10 @@ std::string LLVOAvatar::bakedTextureOriginInfo() return result; } -S32Bytes LLVOAvatar::totalTextureMemForUUIDS(std::set& ids) +S32Bytes LLVOAvatar::totalTextureMemForUUIDS(uuid_set_t& ids) { S32Bytes result(0); - for (std::set::const_iterator it = ids.begin(); it != ids.end(); ++it) + for (auto it = ids.begin(); it != ids.end(); ++it) { LLViewerFetchedTexture *imagep = gTextureList.findImage(*it); if (imagep) @@ -5844,7 +5844,7 @@ S32Bytes LLVOAvatar::totalTextureMemForUUIDS(std::set& ids) return result; } -void LLVOAvatar::collectLocalTextureUUIDs(std::set& ids) const +void LLVOAvatar::collectLocalTextureUUIDs(uuid_set_t& ids) const { for (U32 texture_index = 0; texture_index < getNumTEs(); texture_index++) { @@ -5870,7 +5870,7 @@ void LLVOAvatar::collectLocalTextureUUIDs(std::set& ids) const ids.erase(IMG_INVISIBLE); } -void LLVOAvatar::collectBakedTextureUUIDs(std::set& ids) const +void LLVOAvatar::collectBakedTextureUUIDs(uuid_set_t& ids) const { for (U32 texture_index = 0; texture_index < getNumTEs(); texture_index++) { @@ -5889,7 +5889,7 @@ void LLVOAvatar::collectBakedTextureUUIDs(std::set& ids) const ids.erase(IMG_INVISIBLE); } -void LLVOAvatar::collectTextureUUIDs(std::set& ids) +void LLVOAvatar::collectTextureUUIDs(uuid_set_t& ids) { collectLocalTextureUUIDs(ids); collectBakedTextureUUIDs(ids); @@ -5900,15 +5900,15 @@ void LLVOAvatar::releaseOldTextures() S32Bytes current_texture_mem; // Any textures that we used to be using but are no longer using should no longer be flagged as "NO_DELETE" - std::set baked_texture_ids; + uuid_set_t baked_texture_ids; collectBakedTextureUUIDs(baked_texture_ids); S32Bytes new_baked_mem = totalTextureMemForUUIDS(baked_texture_ids); - std::set local_texture_ids; + uuid_set_t local_texture_ids; collectLocalTextureUUIDs(local_texture_ids); //S32 new_local_mem = totalTextureMemForUUIDS(local_texture_ids); - std::set new_texture_ids; + uuid_set_t new_texture_ids; new_texture_ids.insert(baked_texture_ids.begin(),baked_texture_ids.end()); new_texture_ids.insert(local_texture_ids.begin(),local_texture_ids.end()); S32Bytes new_total_mem = totalTextureMemForUUIDS(new_texture_ids); @@ -5919,7 +5919,7 @@ void LLVOAvatar::releaseOldTextures() { LL_WARNS() << "extra local textures stored for non-self av" << LL_ENDL; } - for (std::set::iterator it = mTextureIDs.begin(); it != mTextureIDs.end(); ++it) + for (auto it = mTextureIDs.begin(); it != mTextureIDs.end(); ++it) { if (new_texture_ids.find(*it) == new_texture_ids.end()) { @@ -6843,7 +6843,7 @@ void LLVOAvatar::updateAttachmentOverrides() { LL_DEBUGS("AnimatedObjects") << "updating" << LL_ENDL; - std::set meshes_seen; + uuid_set_t meshes_seen; // Handle the case that we're updating the skeleton of an animated object. LLControlAvatar *control_av = asControlAvatar(); @@ -6888,8 +6888,8 @@ void LLVOAvatar::updateAttachmentOverrides() // Remove meshes that are no longer present on the skeleton // have to work with a copy because removeAttachmentOverrides() will change mActiveOverrideMeshes. - std::set active_override_meshes = mActiveOverrideMeshes; - for (std::set::iterator it = active_override_meshes.begin(); it != active_override_meshes.end(); ++it) + uuid_set_t active_override_meshes = mActiveOverrideMeshes; + for (auto it = active_override_meshes.begin(); it != active_override_meshes.end(); ++it) { if (meshes_seen.find(*it) == meshes_seen.end()) { @@ -6899,7 +6899,7 @@ void LLVOAvatar::updateAttachmentOverrides() } // addAttachmentPosOverridesForObject //----------------------------------------------------------------------------- -void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set* meshes_seen, bool recursive) +void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, uuid_set_t* meshes_seen, bool recursive) { if (vo->getAvatar() != this && vo->getAvatarAncestor() != this) { @@ -10859,7 +10859,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() max_attachment_complexity = llmax(max_attachment_complexity, DEFAULT_MAX_ATTACHMENT_COMPLEXITY); // Diagnostic list of all textures on our avatar - static std::set all_textures; + static uuid_set_t all_textures; if (mVisualComplexityStale) { diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 32c0df376..6c111e7c9 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -187,16 +187,16 @@ public: void updateLODRiggedAttachments( void ); void updateSoftwareSkinnedVertices(const LLMeshSkinInfo* skin, const LLVector4a* weight, const LLVolumeFace& vol_face, LLVertexBuffer *buffer); /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. - S32Bytes totalTextureMemForUUIDS(std::set& ids); - bool allTexturesCompletelyDownloaded(std::set& ids) const; + S32Bytes totalTextureMemForUUIDS(uuid_set_t& ids); + bool allTexturesCompletelyDownloaded(uuid_set_t& ids) const; bool allLocalTexturesCompletelyDownloaded() const; bool allBakedTexturesCompletelyDownloaded() const; void bakedTextureOriginCounts(S32 &sb_count, S32 &host_count, S32 &both_count, S32 &neither_count); std::string bakedTextureOriginInfo(); - void collectLocalTextureUUIDs(std::set& ids) const; - void collectBakedTextureUUIDs(std::set& ids) const; - void collectTextureUUIDs(std::set& ids); + void collectLocalTextureUUIDs(uuid_set_t& ids) const; + void collectBakedTextureUUIDs(uuid_set_t& ids) const; + void collectTextureUUIDs(uuid_set_t& ids); void releaseOldTextures(); /*virtual*/ void updateTextures(); LLViewerFetchedTexture* getBakedTextureImage(const U8 te, const LLUUID& uuid); @@ -254,7 +254,7 @@ public: virtual LLJoint* getJoint(const std::string &name); LLJoint* getJoint(S32 num); - void addAttachmentOverridesForObject(LLViewerObject *vo, std::set* meshes_seen = NULL, bool recursive = true); + void addAttachmentOverridesForObject(LLViewerObject *vo, uuid_set_t* meshes_seen = NULL, bool recursive = true); void removeAttachmentOverridesForObject(const LLUUID& mesh_id); void removeAttachmentOverridesForObject(LLViewerObject *vo); bool jointIsRiggedTo(const LLJoint *joint) const; @@ -272,7 +272,7 @@ public: // This encodes mesh id and LOD, so we can see whether display is up-to-date. std::map mLastRiggingInfoKey; - std::set mActiveOverrideMeshes; + uuid_set_t mActiveOverrideMeshes; virtual void onActiveOverrideMeshesChanged(); /*virtual*/ const LLUUID& getID() const; @@ -657,7 +657,7 @@ protected: LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; BOOL mLoadedCallbacksPaused; - std::set mTextureIDs; + uuid_set_t mTextureIDs; //-------------------------------------------------------------------- // Local Textures //-------------------------------------------------------------------- diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 24af67adb..c98d19f82 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -309,7 +309,7 @@ const LLVoiceDeviceList& LLVoiceClient::getRenderDevices() //-------------------------------------------------- // participants -void LLVoiceClient::getParticipantList(std::set &participants) +void LLVoiceClient::getParticipantList(uuid_set_t &participants) { if (mVoiceModule) { @@ -317,7 +317,7 @@ void LLVoiceClient::getParticipantList(std::set &participants) } else { - participants = std::set(); + participants = uuid_set_t(); } } diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index b8cf474cc..1c2640085 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -139,7 +139,7 @@ public: virtual LLVoiceDeviceList& getCaptureDevices()=0; virtual LLVoiceDeviceList& getRenderDevices()=0; - virtual void getParticipantList(std::set &participants)=0; + virtual void getParticipantList(uuid_set_t &participants)=0; virtual bool isParticipant(const LLUUID& speaker_id)=0; //@} @@ -420,7 +420,7 @@ public: ///////////////////////////// BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. // Use this to determine whether to show a "no speech" icon in the menu bar. - void getParticipantList(std::set &participants); + void getParticipantList(uuid_set_t &participants); bool isParticipant(const LLUUID& speaker_id); ////////////////////////// diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 5e64585bf..8eec26c6f 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -3932,7 +3932,7 @@ void LLVivoxVoiceClient::sessionState::removeAllParticipants() mParticipantList.shrink_to_fit(); } -void LLVivoxVoiceClient::getParticipantList(std::set &participants) +void LLVivoxVoiceClient::getParticipantList(uuid_set_t &participants) { if(mAudioSession) { diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 2d723184b..9cdf4126c 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -88,7 +88,7 @@ public: virtual LLVoiceDeviceList& getRenderDevices(); //@} - virtual void getParticipantList(std::set &participants); + virtual void getParticipantList(uuid_set_t &participants); virtual bool isParticipant(const LLUUID& speaker_id); // Send a text message to the specified user, initiating the session if necessary. diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index d6a6b9d3f..c3dc38ebe 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -459,7 +459,7 @@ bool RlvUtil::isNearbyAgent(const LLUUID& idAgent) RLV_ASSERT(idAgent.notNull()); if ( (idAgent.notNull()) && (gAgent.getID() != idAgent) ) { - std::vector idAgents; + uuid_vec_t idAgents; LLWorld::getInstance()->getAvatars(&idAgents, NULL); for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++) diff --git a/indra/newview/rlvinventory.h b/indra/newview/rlvinventory.h index 0aee6aa38..186bf6549 100644 --- a/indra/newview/rlvinventory.h +++ b/indra/newview/rlvinventory.h @@ -150,7 +150,7 @@ protected: /*virtual*/ void onDestinationCreated(const LLUUID& idFolder, const std::string& strName); protected: - typedef std::vector folder_ref_t; + typedef uuid_vec_t folder_ref_t; folder_ref_t m_Folders; LLUUID m_idTransaction; }; diff --git a/indra/test/lluuidhashmap_tut.cpp b/indra/test/lluuidhashmap_tut.cpp index 3c6c9cb34..95d9ef8fb 100644 --- a/indra/test/lluuidhashmap_tut.cpp +++ b/indra/test/lluuidhashmap_tut.cpp @@ -87,7 +87,7 @@ namespace tut { LLUUIDHashMap hashTable(UUIDTableEntry::uuidEq, UUIDTableEntry()); const int numElementsToCheck = 32*256*32; - std::vector idList(numElementsToCheck); + uuid_vec_t idList(numElementsToCheck); int i; for (i = 0; i < numElementsToCheck; i++) @@ -128,7 +128,7 @@ namespace tut { LLUUIDHashMap hashTable(UUIDTableEntry::uuidEq, UUIDTableEntry()); const int numElementsToCheck = 5; - std::vector idList(numElementsToCheck*10); + uuid_vec_t idList(numElementsToCheck*10); int i; for (i = 0; i < numElementsToCheck; i++) @@ -173,7 +173,7 @@ namespace tut { LLUUIDHashMap hashTable(UUIDTableEntry::uuidEq, UUIDTableEntry()); const int numElementsToCheck = 10; - std::vector idList(numElementsToCheck); + uuid_vec_t idList(numElementsToCheck); int i; for (i = 0; i < numElementsToCheck; i++) @@ -207,7 +207,7 @@ namespace tut { LLUUIDHashMap hashTable(UUIDTableEntry::uuidEq, UUIDTableEntry()); const int numElementsToCheck = 10; - std::vector idList(numElementsToCheck); + uuid_vec_t idList(numElementsToCheck); int i; for (i = 0; i < numElementsToCheck; i++) @@ -230,7 +230,7 @@ namespace tut { LLUUIDHashMap hashTable(UUIDTableEntry::uuidEq, UUIDTableEntry()); const int numElementsToCheck = 256; - std::vector idList(numElementsToCheck); + uuid_vec_t idList(numElementsToCheck); int i; for (i = 0; i < numElementsToCheck; i++) @@ -275,7 +275,7 @@ namespace tut LLUUIDHashMap hashTable(UUIDTableEntry::uuidEq, UUIDTableEntry()); LLUUIDHashMapIter hashIter(&hashTable); const int numElementsToCheck = 256; - std::vector idList(numElementsToCheck); + uuid_vec_t idList(numElementsToCheck); int i; for (i = 0; i < numElementsToCheck; i++) @@ -312,7 +312,7 @@ namespace tut LLUUIDHashMap hashTable(UUIDTableEntry::uuidEq, UUIDTableEntry()); LLUUIDHashMapIter hashIter(&hashTable); const int numElementsToCheck = 256; - std::vector idList(numElementsToCheck); + uuid_vec_t idList(numElementsToCheck); int i; LLUUID uuidtoSearch;