diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-22 20:51:58 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-22 20:51:58 +0300 |
| commit | 6cc7dd09d5e69cf57e6de7fb568a0ad2693f9c9a (patch) | |
| tree | fab23811a5cedc1ebf01479c852ee92ff62b636c /indra/newview/llpathfindingobjectlist.cpp | |
| parent | ef8f4819822288e044ea719feb6af7a1f4df4c4e (diff) | |
| parent | 7bb5afc11ee5a6af78302a8d76a9a619e2baaab2 (diff) | |
Merge pull request #1545 from Ansariel/DRTVWR-600-maint-A
Merge main into DRTVWR-600-maint-a
Diffstat (limited to 'indra/newview/llpathfindingobjectlist.cpp')
| -rw-r--r-- | indra/newview/llpathfindingobjectlist.cpp | 84 |
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; } |
