From 54b3f3de64f3749022d95063c7439bfed316645f Mon Sep 17 00:00:00 2001 From: Rye Date: Fri, 28 Nov 2025 11:03:31 -0500 Subject: #5072 Use make_shared for more efficient ref counting and allocation --- indra/newview/llpathfindingmanager.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview/llpathfindingmanager.cpp') diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 84a62b3cbf..c9b0978a38 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -451,8 +451,8 @@ void LLPathfindingManager::navMeshStatusRequestCoro(std::string url, U64 regionH { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavMeshStatusRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("NavMeshStatusRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLViewerRegion *region = LLWorld::getInstance()->getRegionFromHandle(regionHandle); if (!region) @@ -541,8 +541,8 @@ void LLPathfindingManager::navAgentStateRequestCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavAgentStateRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("NavAgentStateRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); @@ -569,8 +569,8 @@ void LLPathfindingManager::navMeshRebakeCoro(std::string url, rebake_navmesh_cal { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("NavMeshRebake", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("NavMeshRebake", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD postData = LLSD::emptyMap(); @@ -598,8 +598,8 @@ void LLPathfindingManager::linksetObjectsCoro(std::string url, LinksetsResponder { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetObjects", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("LinksetObjects", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result; @@ -634,8 +634,8 @@ void LLPathfindingManager::linksetTerrainCoro(std::string url, LinksetsResponder { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetTerrain", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("LinksetTerrain", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result; @@ -669,8 +669,8 @@ void LLPathfindingManager::charactersCoro(std::string url, request_id_t requestI { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("LinksetTerrain", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("charactersCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); -- cgit v1.2.3