diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-04-02 15:19:44 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-04-02 15:19:44 -0400 |
commit | 568d6ed229e6d8a32d761482e06828ccc61209a4 (patch) | |
tree | 6046601e9fabf8eff05c612b4943c390170ad715 /indra | |
parent | 2c5c563319d5ba8eaeae93b627536321956d347e (diff) |
EXT-5940 : INFRASTRUCTURE: Typedef all vector<LLUUID>'s
Fixed some more typedefs that I missed in first checkin.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llagentwearablesfetch.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.h | 2 | ||||
-rw-r--r-- | indra/newview/llavatarlist.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llavatarlist.h | 6 | ||||
-rw-r--r-- | indra/newview/llcallfloater.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llgesturemgr.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llinventoryobserver.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llinventoryobserver.h | 16 | ||||
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llsidepanelappearance.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 6 |
15 files changed, 45 insertions, 46 deletions
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 7a9ecd1c7f..1f22ba040d 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -89,7 +89,7 @@ void LLInitialWearablesFetch::processContents() class LLFetchAndLinkObserver: public LLInventoryFetchObserver { public: - LLFetchAndLinkObserver(LLInventoryFetchObserver::item_ref_t& ids): + LLFetchAndLinkObserver(uuid_vec_t& ids): m_ids(ids), LLInventoryFetchObserver(true) // retry for missing items { @@ -103,7 +103,7 @@ public: // Link to all fetched items in COF. LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; - for (LLInventoryFetchObserver::item_ref_t::iterator it = m_ids.begin(); + for (uuid_vec_t::iterator it = m_ids.begin(); it != m_ids.end(); ++it) { @@ -124,7 +124,7 @@ public: } } private: - LLInventoryFetchObserver::item_ref_t m_ids; + uuid_vec_t m_ids; }; void LLInitialWearablesFetch::processWearablesMessage() @@ -132,7 +132,7 @@ void LLInitialWearablesFetch::processWearablesMessage() if (!mAgentInitialWearables.empty()) // We have an empty current outfit folder, use the message data instead. { const LLUUID current_outfit_id = LLAppearanceMgr::instance().getCOF(); - LLInventoryFetchObserver::item_ref_t ids; + uuid_vec_t ids; for (U8 i = 0; i < mAgentInitialWearables.size(); ++i) { // Populate the current outfit folder with links to the wearables passed in the message diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 5a499026e8..423d9bde69 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -298,7 +298,7 @@ public: } CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(mCallable); - LLInventoryFetchObserver::item_ref_t ids; + uuid_vec_t ids; for(S32 i = 0; i < count; ++i) { ids.push_back(item_array.get(i)->getUUID()); diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 6ec62a61a0..407c5b6153 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -39,6 +39,7 @@ #include "llcallingcard.h" // for LLAvatarTracker #include "llcachename.h" #include "llrecentpeople.h" +#include "lluuid.h" #include "llvoiceclient.h" #include "llviewercontrol.h" // for gSavedSettings @@ -53,7 +54,7 @@ static const unsigned ADD_LIMIT = 50; bool LLAvatarList::contains(const LLUUID& id) { - const uuid_vector_t& ids = getIDs(); + const uuid_vec_t& ids = getIDs(); return std::find(ids.begin(), ids.end(), id) != ids.end(); } @@ -303,9 +304,9 @@ void LLAvatarList::refresh() bool LLAvatarList::filterHasMatches() { - uuid_vector_t values = getIDs(); + uuid_vec_t values = getIDs(); - for (uuid_vector_t::const_iterator it=values.begin(); it != values.end(); it++) + for (uuid_vec_t::const_iterator it=values.begin(); it != values.end(); it++) { std::string name; const LLUUID& buddy_id = *it; diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 5a55975413..0203617867 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -53,8 +53,6 @@ class LLAvatarList : public LLFlatListView { LOG_CLASS(LLAvatarList); public: - typedef uuid_vec_t uuid_vector_t; - struct Params : public LLInitParam::Block<Params, LLFlatListView::Params> { Optional<bool> ignore_online_status, // show all items as online @@ -74,7 +72,7 @@ public: void setNameFilter(const std::string& filter); void setDirty(bool val = true, bool force_refresh = false); - uuid_vector_t& getIDs() { return mIDs; } + uuid_vec_t& getIDs() { return mIDs; } bool contains(const LLUUID& id); void setContextMenu(LLAvatarListItem::ContextMenu* menu) { mContextMenu = menu; } @@ -122,7 +120,7 @@ private: LLTimer* mLITUpdateTimer; // last interaction time update timer std::string mIconParamName; std::string mNameFilter; - uuid_vector_t mIDs; + uuid_vec_t mIDs; LLUUID mSessionID; LLAvatarListItem::ContextMenu* mContextMenu; diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 132e4f0933..df3fe522b5 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -660,8 +660,8 @@ void LLCallFloater::setVoiceRemoveTimer(const LLUUID& voice_speaker_id) bool LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) { - LLAvatarList::uuid_vector_t& speaker_uuids = mAvatarList->getIDs(); - LLAvatarList::uuid_vector_t::iterator pos = std::find(speaker_uuids.begin(), speaker_uuids.end(), voice_speaker_id); + uuid_vec_t& speaker_uuids = mAvatarList->getIDs(); + uuid_vec_t::iterator pos = std::find(speaker_uuids.begin(), speaker_uuids.end(), voice_speaker_id); if(pos != speaker_uuids.end()) { speaker_uuids.erase(pos); diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index fbacbd704f..c13ebba923 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -1031,7 +1031,7 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs, else { // Watch this item and set gesture name when item exists in inventory - item_ref_t ids; + uuid_vec_t ids; ids.push_back(item_id); self.fetchItems(ids); } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 10a3713c1e..47d0837ba1 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2007,7 +2007,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done() LLRightClickInventoryFetchObserver* outfit; outfit = new LLRightClickInventoryFetchObserver(mCompleteFolders.front(), mCopyItems); - LLInventoryFetchObserver::item_ref_t ids; + uuid_vec_t ids; for(S32 i = 0; i < count; ++i) { ids.push_back(item_array.get(i)->getUUID()); diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 9913be2e88..128f16ecf5 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -108,6 +108,10 @@ void LLInventoryCompletionObserver::watchItem(const LLUUID& id) } } +LLInventoryFetchObserver::LLInventoryFetchObserver(bool retry_if_missing) : + mRetryIfMissing(retry_if_missing) +{ +} void LLInventoryFetchObserver::changed(U32 mask) { @@ -115,7 +119,7 @@ void LLInventoryFetchObserver::changed(U32 mask) // appropriate. if(!mIncomplete.empty()) { - for(item_ref_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); ) + for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); ) { LLViewerInventoryItem* item = gInventory.getItem(*it); if(!item) @@ -220,11 +224,11 @@ void fetch_items_from_llsd(const LLSD& items_llsd) } void LLInventoryFetchObserver::fetchItems( - const LLInventoryFetchObserver::item_ref_t& ids) + const uuid_vec_t& ids) { LLUUID owner_id; LLSD items_llsd; - for(item_ref_t::const_iterator it = ids.begin(); it < ids.end(); ++it) + for(uuid_vec_t::const_iterator it = ids.begin(); it < ids.end(); ++it) { LLViewerInventoryItem* item = gInventory.getItem(*it); if(item) @@ -475,7 +479,7 @@ void LLInventoryExistenceObserver::changed(U32 mask) // appropriate. if(!mMIA.empty()) { - for(item_ref_t::iterator it = mMIA.begin(); it < mMIA.end(); ) + for(uuid_vec_t::iterator it = mMIA.begin(); it < mMIA.end(); ) { LLViewerInventoryItem* item = gInventory.getItem(*it); if(!item) diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index e1c8bd3faf..14948f4e49 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -109,19 +109,17 @@ protected: class LLInventoryFetchObserver : public LLInventoryObserver { public: - LLInventoryFetchObserver(bool retry_if_missing = false): mRetryIfMissing(retry_if_missing) {} + LLInventoryFetchObserver(bool retry_if_missing = false); virtual void changed(U32 mask); - typedef uuid_vec_t item_ref_t; - bool isEverythingComplete() const; - void fetchItems(const item_ref_t& ids); + void fetchItems(const uuid_vec_t& ids); virtual void done() {}; protected: bool mRetryIfMissing; - item_ref_t mComplete; - item_ref_t mIncomplete; + uuid_vec_t mComplete; + uuid_vec_t mIncomplete; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -192,10 +190,8 @@ public: protected: virtual void done() = 0; - - typedef uuid_vec_t item_ref_t; - item_ref_t mExist; - item_ref_t mMIA; + uuid_vec_t mExist; + uuid_vec_t mMIA; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 7f5e63adee..4c24670f47 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -652,8 +652,8 @@ void LLPanelPeople::updateFriendList() av_tracker.copyBuddyList(all_buddies); // save them to the online and all friends vectors - LLAvatarList::uuid_vector_t& online_friendsp = mOnlineFriendList->getIDs(); - LLAvatarList::uuid_vector_t& all_friendsp = mAllFriendList->getIDs(); + uuid_vec_t& online_friendsp = mOnlineFriendList->getIDs(); + uuid_vec_t& all_friendsp = mAllFriendList->getIDs(); all_friendsp.clear(); online_friendsp.clear(); @@ -746,7 +746,7 @@ void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_si bool LLPanelPeople::isFriendOnline(const LLUUID& id) { - LLAvatarList::uuid_vector_t ids = mOnlineFriendList->getIDs(); + uuid_vec_t ids = mOnlineFriendList->getIDs(); return std::find(ids.begin(), ids.end(), id) != ids.end(); } diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 268738d88c..79a6d80716 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -248,8 +248,8 @@ bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, co bool LLParticipantList::onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { - LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); - LLAvatarList::uuid_vector_t::iterator pos = std::find(group_members.begin(), group_members.end(), event->getValue().asUUID()); + uuid_vec_t& group_members = mAvatarList->getIDs(); + uuid_vec_t::iterator pos = std::find(group_members.begin(), group_members.end(), event->getValue().asUUID()); if(pos != group_members.end()) { group_members.erase(pos); @@ -260,7 +260,7 @@ bool LLParticipantList::onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, bool LLParticipantList::onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { - LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); + uuid_vec_t& group_members = mAvatarList->getIDs(); group_members.clear(); mAvatarList->setDirty(); return true; diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index 6d53f9c049..89c60fed34 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -354,7 +354,7 @@ void LLSidepanelAppearance::fetchInventory() { mNewOutfitBtn->setEnabled(false); - LLInventoryFetchObserver::item_ref_t ids; + uuid_vec_t ids; LLUUID item_id; for(S32 type = (S32)WT_SHAPE; type < (S32)WT_COUNT; ++type) { diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index f37efd778f..617518ab57 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -267,8 +267,8 @@ void LLCategoryDropObserver::done() { // *FIX: coalesce these... LLInventoryItem* item = NULL; - item_ref_t::iterator it = mComplete.begin(); - item_ref_t::iterator end = mComplete.end(); + uuid_vec_t::iterator it = mComplete.begin(); + uuid_vec_t::iterator end = mComplete.end(); for(; it < end; ++it) { item = gInventory.getItem(*it); @@ -326,8 +326,8 @@ void LLCategoryDropDescendentsObserver::done() { unique_ids.insert(items.get(i)->getUUID()); } - LLInventoryFetchObserver::item_ref_t ids; - std::back_insert_iterator<LLInventoryFetchObserver::item_ref_t> copier(ids); + uuid_vec_t ids; + std::back_insert_iterator<uuid_vec_t> copier(ids); std::copy(unique_ids.begin(), unique_ids.end(), copier); LLCategoryDropObserver* dropper; dropper = new LLCategoryDropObserver(mObjectID, mSource); @@ -2567,7 +2567,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( // If every item is accepted, send it on if (drop && (ACCEPT_YES_COPY_SINGLE <= rv)) { - LLInventoryFetchObserver::item_ref_t ids; + uuid_vec_t ids; for (LLInventoryModel::item_array_t::const_iterator item_iter = items.begin(); item_iter != items.end(); ++item_iter) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a8b1257cf6..0277005a89 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6153,7 +6153,7 @@ class LLAttachmentEnableDrop : public view_listener_t // if a fetch is already out there (being sent from a slow sim) // we refetch and there are 2 fetches LLWornItemFetchedObserver* wornItemFetched = new LLWornItemFetchedObserver(); - LLInventoryFetchObserver::item_ref_t items; //add item to the inventory item to be fetched + uuid_vec_t items; //add item to the inventory item to be fetched items.push_back((*attachment_iter)->getItemID()); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 7346b2a76e..9b39cbfdf1 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1203,7 +1203,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // This is an offer from an agent. In this case, the back // end has already copied the items into your inventory, // so we can fetch it out of our inventory. - LLInventoryFetchObserver::item_ref_t items; + uuid_vec_t items; items.push_back(mObjectID); LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(from_string); open_agent_offer->fetchItems(items); @@ -1601,7 +1601,7 @@ void inventory_offer_handler(LLOfferInfo* info) p.name = "UserGiveItem"; // Prefetch the item into your local inventory. - LLInventoryFetchObserver::item_ref_t items; + uuid_vec_t items; items.push_back(info->mObjectID); LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver(); fetch_item->fetchItems(items); @@ -2120,7 +2120,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (is_muted) { // Prefetch the offered item so that it can be discarded by the appropriate observer. (EXT-4331) - LLInventoryFetchObserver::item_ref_t items; + uuid_vec_t items; items.push_back(info->mObjectID); LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver(); fetch_item->fetchItems(items); |