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/llimview.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index bda4afcc04..ad01e11d48 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -429,8 +429,8 @@ void startConferenceCoro(std::string url, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ConferenceChatStart", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("ConferenceChatStart", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD postData; postData["method"] = "start conference"; @@ -478,8 +478,8 @@ void startConferenceCoro(std::string url, void startP2PVoiceCoro(std::string url, LLUUID sessionID, LLUUID creatorId, LLUUID otherParticipantId) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("StartP2PVoiceCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared("StartP2PVoiceCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD postData; postData["method"] = "start p2p voice"; @@ -518,8 +518,8 @@ void chatterBoxInvitationCoro(std::string url, LLUUID sessionId, LLIMMgr::EInvit { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ConferenceInviteStart", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("ConferenceInviteStart", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD postData; postData["method"] = "accept invitation"; @@ -636,8 +636,8 @@ void chatterBoxHistoryCoro(std::string url, LLUUID sessionId, std::string from, { // if parameters from, message and timestamp have values, they are a message that opened chat LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ChatHistory", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("ChatHistory", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD postData; postData["method"] = "fetch history"; -- cgit v1.3