Boost::unordered is better than std::unordered, apparently
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#ifndef LL_LLMULTIGESTURE_H
|
||||
#define LL_LLMULTIGESTURE_H
|
||||
|
||||
#include <unordered_set>
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -100,11 +100,11 @@ public:
|
||||
std::function<void (LLMultiGesture*)> mDoneCallback;
|
||||
|
||||
// Animations that we requested to start
|
||||
std::unordered_set<LLUUID> mRequestedAnimIDs;
|
||||
boost::unordered_set<LLUUID> mRequestedAnimIDs;
|
||||
|
||||
// Once the animation starts playing (sim says to start playing)
|
||||
// the ID is moved from mRequestedAnimIDs to here.
|
||||
std::unordered_set<LLUUID> mPlayingAnimIDs;
|
||||
boost::unordered_set<LLUUID> mPlayingAnimIDs;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -643,7 +643,7 @@ namespace action_give_inventory
|
||||
return acceptable;
|
||||
}
|
||||
|
||||
static void build_items_string(const std::unordered_set<LLUUID>& inventory_selected_uuids, std::string& items_string)
|
||||
static void build_items_string(const boost::unordered_set<LLUUID>& inventory_selected_uuids, std::string& items_string)
|
||||
{
|
||||
llassert(inventory_selected_uuids.size() > 0);
|
||||
|
||||
@@ -838,10 +838,10 @@ void LLAvatarActions::buildResidentsString(const uuid_vec_t& avatar_uuids, std::
|
||||
}
|
||||
|
||||
//static
|
||||
std::unordered_set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs()
|
||||
boost::unordered_set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs()
|
||||
{
|
||||
LLInventoryPanel* active_panel = action_give_inventory::get_active_inventory_panel();
|
||||
return active_panel ? active_panel->getRootFolder()->getSelectionList() : std::unordered_set<LLUUID>();
|
||||
return active_panel ? active_panel->getRootFolder()->getSelectionList() : boost::unordered_set<LLUUID>();
|
||||
/*std::set<LLFolderViewItem*> inventory_selected;
|
||||
|
||||
LLInventoryPanel* active_panel = action_give_inventory::get_active_inventory_panel();
|
||||
@@ -859,7 +859,7 @@ std::unordered_set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs()
|
||||
}
|
||||
}
|
||||
|
||||
std::unordered_set<LLUUID> inventory_selected_uuids;
|
||||
boost::unordered_set<LLUUID> inventory_selected_uuids;
|
||||
for (auto it = inventory_selected.begin(), end_it = inventory_selected.end();
|
||||
it != end_it;
|
||||
++it)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#ifndef LL_LLAVATARACTIONS_H
|
||||
#define LL_LLAVATARACTIONS_H
|
||||
|
||||
#include <unordered_set>
|
||||
#include <boost/unordered_set.hpp>
|
||||
|
||||
class LLAvatarName;
|
||||
class LLInventoryPanel;
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
*/
|
||||
static void buildResidentsString(const uuid_vec_t& avatar_uuids, std::string& residents_string);
|
||||
|
||||
static std::unordered_set<LLUUID> getInventorySelectedUUIDs();
|
||||
static boost::unordered_set<LLUUID> getInventorySelectedUUIDs();
|
||||
|
||||
/**
|
||||
* Copy the selected avatar's UUID to clipboard
|
||||
|
||||
@@ -865,9 +865,9 @@ void LLFolderView::clearSelection()
|
||||
mSelectThisID.setNull();
|
||||
}
|
||||
|
||||
std::unordered_set<LLUUID> LLFolderView::getSelectionList() const
|
||||
boost::unordered_set<LLUUID> LLFolderView::getSelectionList() const
|
||||
{
|
||||
std::unordered_set<LLUUID> selection;
|
||||
boost::unordered_set<LLUUID> selection;
|
||||
for (const auto& item : mSelectedItems)
|
||||
{
|
||||
selection.insert(item->getListener()->getUUID());
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "llviewertexture.h"
|
||||
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
class LLFolderViewEventListener;
|
||||
class LLFolderViewGroupedItemModel;
|
||||
class LLFolderViewFolder;
|
||||
@@ -158,7 +160,7 @@ public:
|
||||
// children, and keeps track of selected objects.
|
||||
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
||||
|
||||
virtual std::unordered_set<LLUUID> getSelectionList() const;
|
||||
virtual boost::unordered_set<LLUUID> getSelectionList() const;
|
||||
|
||||
// Make sure if ancestor is selected, descendants are not
|
||||
void sanitizeSelection();
|
||||
@@ -330,7 +332,7 @@ protected:
|
||||
S32 mSignalSelectCallback;
|
||||
S32 mMinWidth;
|
||||
S32 mRunningHeight;
|
||||
std::unordered_map<LLUUID, LLFolderViewItem*> mItemMap;
|
||||
boost::unordered_map<LLUUID, LLFolderViewItem*> mItemMap;
|
||||
LLUUID mSelectThisID; // if non null, select this item
|
||||
|
||||
LLHandle<LLPanel> mParentPanel;
|
||||
|
||||
@@ -378,9 +378,9 @@ void LLFolderViewItem::setSelectionFromRoot(LLFolderViewItem* selection,
|
||||
getRoot()->setSelection(selection, openitem, take_keyboard_focus);
|
||||
}
|
||||
|
||||
std::unordered_set<LLUUID> LLFolderViewItem::getSelectionList() const
|
||||
boost::unordered_set<LLUUID> LLFolderViewItem::getSelectionList() const
|
||||
{
|
||||
return std::unordered_set<LLUUID>();
|
||||
return boost::unordered_set<LLUUID>();
|
||||
}
|
||||
|
||||
EInventorySortGroup LLFolderViewItem::getSortGroup() const
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
#include "lluiimage.h"
|
||||
#include "lluictrl.h"
|
||||
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <boost/unordered_set.hpp>
|
||||
|
||||
class LLFontGL;
|
||||
class LLFolderView;
|
||||
@@ -221,7 +220,7 @@ public:
|
||||
virtual void selectItem();
|
||||
|
||||
// gets multiple-element selection
|
||||
virtual std::unordered_set<LLUUID> getSelectionList() const;
|
||||
virtual boost::unordered_set<LLUUID> getSelectionList() const;
|
||||
|
||||
// Returns true is this object and all of its children can be removed (deleted by user)
|
||||
virtual BOOL isRemovable();
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
#define LL_LLGESTUREMGR_H
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include <vector>
|
||||
|
||||
#include "llassetstorage.h" // LLAssetType
|
||||
@@ -56,8 +56,8 @@ public:
|
||||
|
||||
typedef std::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t;
|
||||
// Maps inventory item_id to gesture
|
||||
typedef std::unordered_map<LLUUID, LLMultiGesture*> item_map_t;
|
||||
typedef std::unordered_map<LLUUID, gesture_loaded_callback_t> callback_map_t;
|
||||
typedef boost::unordered_map<LLUUID, LLMultiGesture*> item_map_t;
|
||||
typedef boost::unordered_map<LLUUID, gesture_loaded_callback_t> callback_map_t;
|
||||
|
||||
LLGestureMgr();
|
||||
~LLGestureMgr();
|
||||
@@ -186,7 +186,7 @@ private:
|
||||
std::vector<LLMultiGesture*> mPlaying;
|
||||
bool mValid;
|
||||
|
||||
std::unordered_set<LLUUID> mLoadingAssets;
|
||||
boost::unordered_set<LLUUID> mLoadingAssets;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#ifndef LL_LLINVENTORYMODEL_H
|
||||
#define LL_LLINVENTORYMODEL_H
|
||||
|
||||
#include <unordered_map>
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -154,13 +154,13 @@ private:
|
||||
// the inventory using several different identifiers.
|
||||
// mInventory member data is the 'master' list of inventory, and
|
||||
// mCategoryMap and mItemMap store uuid->object mappings.
|
||||
typedef std::unordered_map<LLUUID, LLPointer<LLViewerInventoryCategory> > cat_map_t;
|
||||
typedef std::unordered_map<LLUUID, LLPointer<LLViewerInventoryItem> > item_map_t;
|
||||
typedef boost::unordered_map<LLUUID, LLPointer<LLViewerInventoryCategory> > cat_map_t;
|
||||
typedef boost::unordered_map<LLUUID, LLPointer<LLViewerInventoryItem> > item_map_t;
|
||||
cat_map_t mCategoryMap;
|
||||
item_map_t mItemMap;
|
||||
// This last set of indices is used to map parents to children.
|
||||
typedef std::unordered_map<LLUUID, cat_array_t*> parent_cat_map_t;
|
||||
typedef std::unordered_map<LLUUID, item_array_t*> parent_item_map_t;
|
||||
typedef boost::unordered_map<LLUUID, cat_array_t*> parent_cat_map_t;
|
||||
typedef boost::unordered_map<LLUUID, item_array_t*> parent_item_map_t;
|
||||
parent_cat_map_t mParentChildCategoryTree;
|
||||
parent_item_map_t mParentChildItemTree;
|
||||
|
||||
@@ -467,7 +467,7 @@ public:
|
||||
LLInitializedS32& operator++() { ++mValue; return *this; }
|
||||
LLInitializedS32& operator--() { --mValue; return *this; }
|
||||
};
|
||||
typedef std::unordered_map<LLUUID, LLInitializedS32> update_map_t;
|
||||
typedef boost::unordered_map<LLUUID, LLInitializedS32> update_map_t;
|
||||
|
||||
// Call when there are category updates. Call them *before* the
|
||||
// actual update so the method can do descendent accounting correctly.
|
||||
@@ -592,8 +592,8 @@ protected:
|
||||
cat_array_t* getUnlockedCatArray(const LLUUID& id);
|
||||
item_array_t* getUnlockedItemArray(const LLUUID& id);
|
||||
private:
|
||||
std::unordered_map<LLUUID, bool> mCategoryLock;
|
||||
std::unordered_map<LLUUID, bool> mItemLock;
|
||||
boost::unordered_map<LLUUID, bool> mCategoryLock;
|
||||
boost::unordered_map<LLUUID, bool> mItemLock;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Debugging
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "lluuid.h"
|
||||
#include "llmd5.h"
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <vector>
|
||||
|
||||
class LLViewerInventoryCategory;
|
||||
@@ -285,7 +285,7 @@ protected:
|
||||
LLUUID mCatID;
|
||||
};
|
||||
|
||||
typedef std::unordered_map<LLUUID, LLCategoryData> category_map_t;
|
||||
typedef boost::unordered_map<LLUUID, LLCategoryData> category_map_t;
|
||||
typedef category_map_t::value_type category_map_value_t;
|
||||
|
||||
category_map_t mCategoryMap;
|
||||
|
||||
@@ -211,7 +211,7 @@ protected:
|
||||
LLScrollContainer* mScroller;
|
||||
|
||||
LLPointer<LLFolderViewGroupedItemBridge> mGroupedItemBridge;
|
||||
std::unordered_map<LLUUID, LLFolderViewItem*> mItemMap;
|
||||
boost::unordered_map<LLUUID, LLFolderViewItem*> mItemMap;
|
||||
/**
|
||||
* Pointer to LLInventoryFolderViewModelBuilder.
|
||||
*
|
||||
|
||||
@@ -1710,7 +1710,7 @@ void LLPanelObjectInventory::updateInventory()
|
||||
// << " panel UUID: " << panel->mTaskUUID << "\n"
|
||||
// << " task UUID: " << object->mID << LL_ENDL;
|
||||
// We're still interested in this task's inventory.
|
||||
std::unordered_set<LLUUID> selected_items;
|
||||
boost::unordered_set<LLUUID> selected_items;
|
||||
BOOL inventory_has_focus = FALSE;
|
||||
if (mHaveInventory)
|
||||
{
|
||||
|
||||
@@ -881,7 +881,7 @@ private:
|
||||
}
|
||||
|
||||
LLHandle<LLPanel> mActivePanel;
|
||||
typedef std::unordered_set<LLUUID> selected_items_t;
|
||||
typedef boost::unordered_set<LLUUID> selected_items_t;
|
||||
selected_items_t mSelectedItems;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user