summaryrefslogtreecommitdiff
path: root/indra/newview/llpathfindingobjectlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpathfindingobjectlist.cpp')
-rw-r--r--indra/newview/llpathfindingobjectlist.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/indra/newview/llpathfindingobjectlist.cpp b/indra/newview/llpathfindingobjectlist.cpp
index f1ecb45fc0..0ea782649c 100644
--- a/indra/newview/llpathfindingobjectlist.cpp
+++ b/indra/newview/llpathfindingobjectlist.cpp
@@ -1,4 +1,4 @@
-/**
+/**
* @file llpathfindingobjectlist.cpp
* @brief Implementation of llpathfindingobjectlist
* @author Stinson@lindenlab.com
@@ -39,84 +39,84 @@
//---------------------------------------------------------------------------
LLPathfindingObjectList::LLPathfindingObjectList()
- : mObjectMap()
+ : mObjectMap()
{
}
LLPathfindingObjectList::~LLPathfindingObjectList()
{
- clear();
+ clear();
}
bool LLPathfindingObjectList::isEmpty() const
{
- return mObjectMap.empty();
+ return mObjectMap.empty();
}
void LLPathfindingObjectList::clear()
{
- for (LLPathfindingObjectMap::iterator objectIter = mObjectMap.begin(); objectIter != mObjectMap.end(); ++objectIter)
- {
- objectIter->second.reset();
- }
- mObjectMap.clear();
+ for (LLPathfindingObjectMap::iterator objectIter = mObjectMap.begin(); objectIter != mObjectMap.end(); ++objectIter)
+ {
+ objectIter->second.reset();
+ }
+ mObjectMap.clear();
}
void LLPathfindingObjectList::update(LLPathfindingObjectPtr pUpdateObjectPtr)
{
- if (pUpdateObjectPtr != NULL)
- {
- std::string updateObjectId = pUpdateObjectPtr->getUUID().asString();
-
- LLPathfindingObjectMap::iterator foundObjectIter = mObjectMap.find(updateObjectId);
- if (foundObjectIter == mObjectMap.end())
- {
- mObjectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(updateObjectId, pUpdateObjectPtr));
- }
- else
- {
- foundObjectIter->second = pUpdateObjectPtr;
- }
- }
+ if (pUpdateObjectPtr != NULL)
+ {
+ std::string updateObjectId = pUpdateObjectPtr->getUUID().asString();
+
+ LLPathfindingObjectMap::iterator foundObjectIter = mObjectMap.find(updateObjectId);
+ if (foundObjectIter == mObjectMap.end())
+ {
+ mObjectMap.insert(std::pair<std::string, LLPathfindingObjectPtr>(updateObjectId, pUpdateObjectPtr));
+ }
+ else
+ {
+ foundObjectIter->second = pUpdateObjectPtr;
+ }
+ }
}
void LLPathfindingObjectList::update(LLPathfindingObjectListPtr pUpdateObjectListPtr)
{
- if ((pUpdateObjectListPtr != NULL) && !pUpdateObjectListPtr->isEmpty())
- {
- for (LLPathfindingObjectMap::const_iterator updateObjectIter = pUpdateObjectListPtr->begin();
- updateObjectIter != pUpdateObjectListPtr->end(); ++updateObjectIter)
- {
- const LLPathfindingObjectPtr updateObjectPtr = updateObjectIter->second;
- update(updateObjectPtr);
- }
- }
+ if ((pUpdateObjectListPtr != NULL) && !pUpdateObjectListPtr->isEmpty())
+ {
+ for (LLPathfindingObjectMap::const_iterator updateObjectIter = pUpdateObjectListPtr->begin();
+ updateObjectIter != pUpdateObjectListPtr->end(); ++updateObjectIter)
+ {
+ const LLPathfindingObjectPtr updateObjectPtr = updateObjectIter->second;
+ update(updateObjectPtr);
+ }
+ }
}
LLPathfindingObjectPtr LLPathfindingObjectList::find(const std::string &pObjectId) const
{
- LLPathfindingObjectPtr objectPtr;
+ LLPathfindingObjectPtr objectPtr;
- LLPathfindingObjectMap::const_iterator objectIter = mObjectMap.find(pObjectId);
- if (objectIter != mObjectMap.end())
- {
- objectPtr = objectIter->second;
- }
+ LLPathfindingObjectMap::const_iterator objectIter = mObjectMap.find(pObjectId);
+ if (objectIter != mObjectMap.end())
+ {
+ objectPtr = objectIter->second;
+ }
- return objectPtr;
+ return objectPtr;
}
LLPathfindingObjectList::const_iterator LLPathfindingObjectList::begin() const
{
- return mObjectMap.begin();
+ return mObjectMap.begin();
}
LLPathfindingObjectList::const_iterator LLPathfindingObjectList::end() const
{
- return mObjectMap.end();
+ return mObjectMap.end();
}
LLPathfindingObjectMap &LLPathfindingObjectList::getObjectMap()
{
- return mObjectMap;
+ return mObjectMap;
}