Boost unordered containers in places, like for uuid types!
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include "stdtypes.h"
|
||||
#include "llpreprocessor.h"
|
||||
|
||||
@@ -289,7 +290,7 @@ inline U32 LLUUID::getCRC32() const
|
||||
}
|
||||
|
||||
typedef std::vector<LLUUID> uuid_vec_t;
|
||||
typedef std::set<LLUUID> uuid_set_t;
|
||||
typedef boost::unordered_set<LLUUID> uuid_set_t;
|
||||
|
||||
// Helper structure for ordering lluuids in stl containers. eg:
|
||||
// std::map<LLUUID, LLWidget*, lluuid_less> widget_map;
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "lluuid.h"
|
||||
#include "llstring.h"
|
||||
#include "llframetimer.h"
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
class LLTextBox;
|
||||
class LLScrollListCtrl;
|
||||
@@ -92,7 +93,7 @@ private:
|
||||
LLUUID group_id;
|
||||
};
|
||||
uuid_set_t mPendingObjects;
|
||||
std::map<LLUUID, ObjectData> mCachedObjects;
|
||||
boost::unordered_map<LLUUID, ObjectData> mCachedObjects;
|
||||
|
||||
std::string mFilterStrings[LIST_OBJECT_COUNT];
|
||||
};
|
||||
|
||||
@@ -641,7 +641,7 @@ namespace action_give_inventory
|
||||
return acceptable;
|
||||
}
|
||||
|
||||
static void build_items_string(const boost::unordered_set<LLUUID>& inventory_selected_uuids, std::string& items_string)
|
||||
static void build_items_string(const uuid_set_t& inventory_selected_uuids, std::string& items_string)
|
||||
{
|
||||
llassert(inventory_selected_uuids.size() > 0);
|
||||
|
||||
@@ -836,10 +836,10 @@ void LLAvatarActions::buildResidentsString(const uuid_vec_t& avatar_uuids, std::
|
||||
}
|
||||
|
||||
//static
|
||||
boost::unordered_set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs()
|
||||
uuid_set_t LLAvatarActions::getInventorySelectedUUIDs()
|
||||
{
|
||||
LLInventoryPanel* active_panel = action_give_inventory::get_active_inventory_panel();
|
||||
return active_panel ? active_panel->getRootFolder()->getSelectionList() : boost::unordered_set<LLUUID>();
|
||||
return active_panel ? active_panel->getRootFolder()->getSelectionList() : uuid_set_t();
|
||||
/*std::set<LLFolderViewItem*> inventory_selected;
|
||||
|
||||
LLInventoryPanel* active_panel = action_give_inventory::get_active_inventory_panel();
|
||||
@@ -857,7 +857,7 @@ boost::unordered_set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs()
|
||||
}
|
||||
}
|
||||
|
||||
boost::unordered_set<LLUUID> inventory_selected_uuids;
|
||||
uuid_set_t inventory_selected_uuids;
|
||||
for (auto it = inventory_selected.begin(), end_it = inventory_selected.end();
|
||||
it != end_it;
|
||||
++it)
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
*/
|
||||
static void buildResidentsString(const uuid_vec_t& avatar_uuids, std::string& residents_string);
|
||||
|
||||
static boost::unordered_set<LLUUID> getInventorySelectedUUIDs();
|
||||
static uuid_set_t getInventorySelectedUUIDs();
|
||||
|
||||
/**
|
||||
* Copy the selected avatar's UUID to clipboard
|
||||
|
||||
@@ -23,7 +23,7 @@ LLFloaterBlacklist* LLFloaterBlacklist::sInstance;
|
||||
uuid_vec_t LLFloaterBlacklist::blacklist_textures;
|
||||
uuid_vec_t LLFloaterBlacklist::blacklist_objects;
|
||||
|
||||
std::map<LLUUID,LLSD> LLFloaterBlacklist::blacklist_entries;
|
||||
boost::unordered_map<LLUUID,LLSD> LLFloaterBlacklist::blacklist_entries;
|
||||
|
||||
LLFloaterBlacklist::LLFloaterBlacklist()
|
||||
: LLFloater()
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
*/
|
||||
static void addEntry(LLUUID key, LLSD data);
|
||||
|
||||
static std::map<LLUUID,LLSD> blacklist_entries;
|
||||
static boost::unordered_map<LLUUID,LLSD> blacklist_entries;
|
||||
static uuid_vec_t blacklist_textures;
|
||||
static uuid_vec_t blacklist_objects;
|
||||
|
||||
|
||||
@@ -865,9 +865,9 @@ void LLFolderView::clearSelection()
|
||||
mSelectThisID.setNull();
|
||||
}
|
||||
|
||||
boost::unordered_set<LLUUID> LLFolderView::getSelectionList() const
|
||||
uuid_set_t LLFolderView::getSelectionList() const
|
||||
{
|
||||
boost::unordered_set<LLUUID> selection;
|
||||
uuid_set_t selection;
|
||||
for (const auto& item : mSelectedItems)
|
||||
{
|
||||
selection.insert(item->getListener()->getUUID());
|
||||
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
// children, and keeps track of selected objects.
|
||||
virtual BOOL changeSelection(LLFolderViewItem* selection, BOOL selected);
|
||||
|
||||
virtual boost::unordered_set<LLUUID> getSelectionList() const;
|
||||
virtual uuid_set_t getSelectionList() const;
|
||||
|
||||
// Make sure if ancestor is selected, descendants are not
|
||||
void sanitizeSelection();
|
||||
|
||||
@@ -378,9 +378,9 @@ void LLFolderViewItem::setSelectionFromRoot(LLFolderViewItem* selection,
|
||||
getRoot()->setSelection(selection, openitem, take_keyboard_focus);
|
||||
}
|
||||
|
||||
boost::unordered_set<LLUUID> LLFolderViewItem::getSelectionList() const
|
||||
uuid_set_t LLFolderViewItem::getSelectionList() const
|
||||
{
|
||||
return boost::unordered_set<LLUUID>();
|
||||
return uuid_set_t();
|
||||
}
|
||||
|
||||
EInventorySortGroup LLFolderViewItem::getSortGroup() const
|
||||
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
virtual void selectItem();
|
||||
|
||||
// gets multiple-element selection
|
||||
virtual boost::unordered_set<LLUUID> getSelectionList() const;
|
||||
virtual uuid_set_t getSelectionList() const;
|
||||
|
||||
// Returns true is this object and all of its children can be removed (deleted by user)
|
||||
virtual BOOL isRemovable();
|
||||
|
||||
@@ -186,7 +186,7 @@ private:
|
||||
std::vector<LLMultiGesture*> mPlaying;
|
||||
bool mValid;
|
||||
|
||||
boost::unordered_set<LLUUID> mLoadingAssets;
|
||||
uuid_set_t mLoadingAssets;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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.
|
||||
boost::unordered_set<LLUUID> selected_items;
|
||||
uuid_set_t selected_items;
|
||||
BOOL inventory_has_focus = FALSE;
|
||||
if (mHaveInventory)
|
||||
{
|
||||
|
||||
@@ -212,7 +212,7 @@ private:
|
||||
std::string mFolder;
|
||||
|
||||
// Export texture list
|
||||
typedef boost::unordered_set<LLUUID> textures_set_t;
|
||||
typedef uuid_set_t textures_set_t;
|
||||
textures_set_t mTexturesList;
|
||||
textures_set_t mBadPermsTexturesList;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user