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/llinventorymodelbackgroundfetch.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llinventorymodelbackgroundfetch.cpp') diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index d538d42972..fa02b0f5ab 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -1217,7 +1217,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch() if (! url.empty()) { - LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(folder_request_body, recursive_cats)); + LLCore::HttpHandler::ptr_t handler = std::make_shared(folder_request_body, recursive_cats); gInventory.requestPost(false, url, folder_request_body, handler, "Inventory Folder"); } } @@ -1228,7 +1228,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch() if (! url.empty()) { - LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(folder_request_body_lib, recursive_cats)); + LLCore::HttpHandler::ptr_t handler = std::make_shared(folder_request_body_lib, recursive_cats); gInventory.requestPost(false, url, folder_request_body_lib, handler, "Library Folder"); } } @@ -1244,7 +1244,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch() { LLSD body; body["items"] = item_request_body; - LLCore::HttpHandler::ptr_t handler(new BGItemHttpHandler(body)); + LLCore::HttpHandler::ptr_t handler = std::make_shared(body); gInventory.requestPost(false, url, body, handler, "Inventory Item"); } } @@ -1257,7 +1257,7 @@ void LLInventoryModelBackgroundFetch::bulkFetch() { LLSD body; body["items"] = item_request_body_lib; - LLCore::HttpHandler::ptr_t handler(new BGItemHttpHandler(body)); + LLCore::HttpHandler::ptr_t handler = std::make_shared(body); gInventory.requestPost(false, url, body, handler, "Library Item"); } } @@ -1543,7 +1543,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http { LLSD request_body; request_body["folders"] = folders; - LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats)); + LLCore::HttpHandler::ptr_t handler = std::make_shared(request_body, recursive_cats); gInventory.requestPost(false, url, request_body, handler, "Inventory Folder"); recursive_cats.clear(); folders.clear(); @@ -1553,7 +1553,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http LLSD request_body; request_body["folders"] = folders; - LLCore::HttpHandler::ptr_t handler(new BGFolderHttpHandler(request_body, recursive_cats)); + LLCore::HttpHandler::ptr_t handler = std::make_shared(request_body, recursive_cats); gInventory.requestPost(false, url, request_body, handler, "Inventory Folder"); return; } -- cgit v1.3