Starting war on std::map. Peeked at what NickyD and Zwag were doing.

This commit is contained in:
Siana Gearz
2013-05-11 17:52:13 +02:00
parent 30332cff3f
commit e86f3a5cbd
7 changed files with 10 additions and 599 deletions

View File

@@ -39,6 +39,7 @@
// common includes
#include "llstat.h"
#include "llstring.h"
#include "sguuidhash.h"
// project includes
#include "llviewerobject.h"
@@ -216,8 +217,8 @@ public:
std::set<LLUUID> mDeadObjects;
std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
std::map<LLUUID, LLPointer<LLVOAvatar> > mUUIDAvatarMap;
boost::unordered_map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap;
boost::unordered_map<LLUUID, LLPointer<LLVOAvatar> > mUUIDAvatarMap;
//set of objects that need to update their cost
std::set<LLUUID> mStaleObjectCost;
@@ -269,7 +270,7 @@ extern LLViewerObjectList gObjectList;
// Inlines
inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id) const
{
std::map<LLUUID, LLPointer<LLViewerObject> >::const_iterator iter = mUUIDObjectMap.find(id);
boost::unordered_map<LLUUID, LLPointer<LLViewerObject> >::const_iterator iter = mUUIDObjectMap.find(id);
if(iter != mUUIDObjectMap.end())
{
return iter->second;
@@ -282,7 +283,7 @@ inline LLViewerObject *LLViewerObjectList::findObject(const LLUUID &id) const
inline LLVOAvatar *LLViewerObjectList::findAvatar(const LLUUID &id) const
{
std::map<LLUUID, LLPointer<LLVOAvatar> >::const_iterator iter = mUUIDAvatarMap.find(id);
boost::unordered_map<LLUUID, LLPointer<LLVOAvatar> >::const_iterator iter = mUUIDAvatarMap.find(id);
return (iter != mUUIDAvatarMap.end()) ? iter->second.get() : NULL;
}