diff options
| author | Brad Linden <brad@lindenlab.com> | 2024-05-23 11:31:19 -0700 | 
|---|---|---|
| committer | Brad Linden <brad@lindenlab.com> | 2024-05-23 11:31:19 -0700 | 
| commit | a1f49564d670a2c41bfa25c833bba2564b9b7f48 (patch) | |
| tree | 1d205e51bc37621916a17d459ad83782fe41f975 /indra/newview/llpathfindingobjectlist.cpp | |
| parent | 6af5db09faf5ea33a2d4c47b64e76f42edae178a (diff) | |
| parent | 6377610f6587989c126b00f490dfc8d527a1c2ce (diff) | |
Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into brad/merge-maint-a-to-dev
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;  }  | 
