Use boost::unordered_map instead of std::map for blacklisted asset data in asset blacklist

Ansariel 2013-03-22 20:42:36 +01:00
parent 30840bdf4e
commit b46a651dee
2 changed files with 4 additions and 3 deletions

View File

@ -87,7 +87,7 @@ void FSWSAssetBlacklist::addNewItemToBlacklist(const LLUUID& id, const std::stri
{
LLDate curdate = LLDate(time_corrected());
std::string input_date = curdate.asString();
input_date.replace(input_date.find("T"),1," ");
input_date.replace(input_date.find("T"), 1, " ");
input_date.resize(input_date.size() - 1);
LLSD data;
@ -123,7 +123,7 @@ void FSWSAssetBlacklist::addNewItemToBlacklistData(const LLUUID& id, const LLSD&
LLAssetType::EType type = S32toAssetType(data["asset_type"].asInteger());
addEntryToBlacklistMap(id, type);
mBlacklistData.insert(std::pair<LLUUID, LLSD>(id, data));
mBlacklistData[id] = data;
if (save)
{

View File

@ -28,6 +28,7 @@
#ifndef FS_WSASSETBLACKLIST_H
#define FS_WSASSETBLACKLIST_H
#include <boost/unordered_map.hpp>
#include <boost/unordered_set.hpp>
#include "fscommon.h"
@ -37,7 +38,7 @@
typedef boost::unordered_set<LLUUID, FSUUIDEntryHasher> t_blacklisted_uuid_container;
typedef std::map<LLAssetType::EType, t_blacklisted_uuid_container> t_blacklist_type_map;
typedef std::map<LLUUID, LLSD> t_blacklist_data;
typedef boost::unordered_map<LLUUID, LLSD, FSUUIDEntryHasher> t_blacklist_data;
class FSWSAssetBlacklist : public LLSingleton<FSWSAssetBlacklist>
{