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/llviewermessage.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3498c2e567..36e8e27800 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -162,8 +162,8 @@ void accept_friendship_coro(std::string url, LLSD notification) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("friendshipResponceErrorProcessing", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); if (url.empty()) { LL_WARNS("Friendship") << "Empty capability!" << LL_ENDL; @@ -212,8 +212,8 @@ void decline_friendship_coro(std::string url, LLSD notification, S32 option) } LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("friendshipResponceErrorProcessing", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("friendshipResponceErrorProcessing", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD payload = notification["payload"]; url += "?from=" + payload["from_id"].asString(); @@ -570,8 +570,8 @@ void response_group_invitation_coro(std::string url, LLUUID group_id, bool notif LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("responseGroupInvitation", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("responseGroupInvitation", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD payload; payload["group"] = group_id; @@ -2017,7 +2017,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response) if (notification_ptr) { - LLNotificationFormPtr modified_form(new LLNotificationForm(*notification_ptr->getForm())); + LLNotificationFormPtr modified_form = std::make_shared(*notification_ptr->getForm()); modified_form->setElementEnabled("Teleport", false); modified_form->setElementEnabled("Cancel", false); notification_ptr->updateForm(modified_form); -- cgit v1.3