Use boost::unordered_map instead of std::map for blacklisted asset data in asset blacklist
parent
30840bdf4e
commit
b46a651dee
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue