From d294d568d1c97650bba4c388c8a7eab5a5c49c94 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 21 Oct 2025 22:05:07 +0300 Subject: #4411 WIP initial restoring of Legacy Search --- indra/newview/llstartup.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3786a9b160..cec34635f6 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -122,6 +122,7 @@ #include "llpanellogin.h" #include "llmutelist.h" #include "llavatarpropertiesprocessor.h" +#include "llpaneldirbrowser.h" #include "llpanelgrouplandmoney.h" #include "llpanelgroupnotices.h" #include "llparcel.h" @@ -2871,6 +2872,13 @@ void register_viewer_callbacks(LLMessageSystem* msg) msg->setHandlerFunc("AvatarPickerReply", LLFloaterAvatarPicker::processAvatarPickerReply); + msg->setHandlerFunc("DirPlacesReply", LLPanelDirBrowser::processDirPlacesReply); + msg->setHandlerFunc("DirPeopleReply", LLPanelDirBrowser::processDirPeopleReply); + msg->setHandlerFunc("DirEventsReply", LLPanelDirBrowser::processDirEventsReply); + msg->setHandlerFunc("DirGroupsReply", LLPanelDirBrowser::processDirGroupsReply); + msg->setHandlerFunc("DirClassifiedReply", LLPanelDirBrowser::processDirClassifiedReply); + msg->setHandlerFunc("DirLandReply", LLPanelDirBrowser::processDirLandReply); + msg->setHandlerFunc("MapBlockReply", LLWorldMapMessage::processMapBlockReply); msg->setHandlerFunc("MapItemReply", LLWorldMapMessage::processMapItemReply); msg->setHandlerFunc("EventInfoReply", LLEventNotifier::processEventInfoReply); -- cgit v1.3 From ba133e41da0694ead01bc5536557c87640187cf5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Tue, 11 Nov 2025 23:29:52 +0200 Subject: #4671 Fix impractically long am/pm labels --- indra/newview/llstartup.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index cec34635f6..a9ea741c89 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -458,6 +458,32 @@ bool idle_startup() LLStringOps::sAM = LLTrans::getString("dateTimeAM"); LLStringOps::sPM = LLTrans::getString("dateTimePM"); } + else + { + std::wstring utf16str = ll_convert(val); + if (utf16str.size() > 4) + { + LL_DEBUGS("InitInfo") << "Current locale \"" << locale << "\" " + << "has impracitcally long AM/PM time format" << LL_ENDL; + // fallback to declarations in strings.xml + LLStringOps::sAM = LLTrans::getString("dateTimeAM"); + LLStringOps::sPM = LLTrans::getString("dateTimePM"); + } + } + } + + // Some locales (as well some of our own dateTimeAM/PM) return long + // strings for AM/PM which aren't practical to display in the UI. + // Hardcode to "AM"/"PM" in those cases. + std::wstring utf16str = ll_convert(LLStringOps::sAM); + if (utf16str.size() > 4) + { + LLStringOps::sAM = "AM"; + } + utf16str = ll_convert(LLStringOps::sPM); + if (utf16str.size() > 4) + { + LLStringOps::sPM = "PM"; } } -- cgit v1.3 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/llcharacter/llkeyframemotion.cpp | 4 +- indra/llcommon/llapr.cpp | 2 +- indra/llcommon/llleap.cpp | 2 +- indra/llcommon/llstring.h | 4 +- indra/llcorehttp/_httpoprequest.cpp | 4 +- indra/llcorehttp/httpcommon.h | 14 ++-- indra/llcorehttp/httprequest.cpp | 30 +++---- indra/llcorehttp/httprequest.h | 6 +- indra/llimage/llimageworker.cpp | 2 +- indra/llmessage/llavatarnamecache.cpp | 6 +- indra/llmessage/llcoproceduremanager.cpp | 4 +- indra/llmessage/llcorehttputil.cpp | 56 ++++++------- indra/llmessage/llcorehttputil.h | 98 +++++++++++----------- indra/llmessage/llexperiencecache.cpp | 18 ++-- indra/llmessage/message.cpp | 10 +-- .../llmessage/tests/llcoproceduremanager_test.cpp | 2 +- indra/llui/llfolderviewmodel.h | 4 +- indra/llui/llnotifications.cpp | 16 ++-- indra/llui/llnotificationslistener.cpp | 2 +- indra/newview/llaccountingcostmanager.cpp | 4 +- indra/newview/llagent.cpp | 14 ++-- indra/newview/llaisapi.cpp | 4 +- indra/newview/llappearancemgr.cpp | 6 +- indra/newview/llavatarpropertiesprocessor.cpp | 6 +- indra/newview/llavatarrenderinfoaccountant.cpp | 12 +-- indra/newview/llcompilequeue.cpp | 4 +- indra/newview/llenvironment.cpp | 16 ++-- indra/newview/llestateinfomodel.cpp | 4 +- indra/newview/lleventpoll.cpp | 6 +- indra/newview/llfloaterabout.cpp | 10 +-- indra/newview/llfloateravatarpicker.cpp | 12 +-- indra/newview/llfloaterbvhpreview.cpp | 4 +- indra/newview/llfloaterexperiences.cpp | 8 +- indra/newview/llfloatergridstatus.cpp | 8 +- indra/newview/llfloaterimagepreview.cpp | 4 +- indra/newview/llfloatermodeluploadbase.cpp | 4 +- indra/newview/llfloatermyscripts.cpp | 4 +- indra/newview/llfloaterpay.cpp | 8 +- indra/newview/llfloaterperms.cpp | 4 +- indra/newview/llfloaterpreference.cpp | 8 +- indra/newview/llfloaterregioninfo.cpp | 4 +- indra/newview/llfloaterregionrestartschedule.cpp | 12 +-- indra/newview/llfloaterreporter.cpp | 6 +- indra/newview/llfloaterscriptlimits.cpp | 12 +-- indra/newview/llfloatersimplesnapshot.cpp | 12 +-- indra/newview/llfloatertos.cpp | 6 +- indra/newview/llfloaterurlentry.cpp | 8 +- indra/newview/llgesturemgr.cpp | 2 +- indra/newview/llgltfmateriallist.cpp | 6 +- indra/newview/llgroupmgr.cpp | 18 ++-- indra/newview/llimprocessing.cpp | 4 +- indra/newview/llimview.cpp | 16 ++-- indra/newview/llinventorybridge.cpp | 4 +- indra/newview/llinventorygallery.cpp | 2 +- indra/newview/llinventorymodel.cpp | 10 +-- indra/newview/llinventorymodelbackgroundfetch.cpp | 12 +-- indra/newview/llinventoryobserver.cpp | 2 +- indra/newview/lllogininstance.cpp | 2 +- indra/newview/llmarketplacefunctions.cpp | 58 ++++++------- indra/newview/llmaterialmgr.cpp | 20 ++--- indra/newview/llmediadataclient.cpp | 18 ++-- indra/newview/llmeshrepository.cpp | 26 +++--- indra/newview/llnotificationmanager.cpp | 2 +- indra/newview/llpanelavatar.cpp | 6 +- indra/newview/llpanellogin.cpp | 2 +- indra/newview/llpanelprofile.cpp | 12 +-- indra/newview/llpanelwearing.cpp | 4 +- indra/newview/llpathfindingcharacterlist.cpp | 2 +- indra/newview/llpathfindinglinksetlist.cpp | 2 +- indra/newview/llpathfindingmanager.cpp | 24 +++--- indra/newview/llpbrterrainfeatures.cpp | 12 +-- indra/newview/llpersistentnotificationstorage.cpp | 2 +- indra/newview/llproductinforequest.cpp | 4 +- indra/newview/llremoteparcelrequest.cpp | 4 +- indra/newview/llsnapshotlivepreview.cpp | 4 +- indra/newview/llspeakers.cpp | 6 +- indra/newview/llstartup.cpp | 6 +- indra/newview/llstatusbar.cpp | 6 +- indra/newview/llsyntaxid.cpp | 4 +- indra/newview/lltexturefetch.cpp | 10 +-- indra/newview/lltoast.cpp | 2 +- indra/newview/lltranslate.cpp | 16 ++-- indra/newview/llviewerassetstorage.cpp | 6 +- indra/newview/llviewerassetupload.cpp | 4 +- indra/newview/llviewerdisplayname.cpp | 6 +- indra/newview/llviewerinventory.cpp | 2 +- indra/newview/llviewermedia.cpp | 26 +++--- indra/newview/llviewermenufile.cpp | 7 +- indra/newview/llviewermessage.cpp | 14 ++-- indra/newview/llviewerobject.cpp | 4 +- indra/newview/llviewerobjectlist.cpp | 8 +- indra/newview/llviewerregion.cpp | 12 +-- indra/newview/llviewerwindow.cpp | 4 +- indra/newview/llvoavatarself.cpp | 6 +- indra/newview/llvoicechannel.cpp | 4 +- indra/newview/llvoicevivox.cpp | 12 +-- indra/newview/llvoicewebrtc.cpp | 44 +++++----- indra/newview/llwebprofile.cpp | 8 +- indra/newview/llwindowlistener.cpp | 2 +- indra/newview/llwlhandlers.cpp | 8 +- indra/newview/llxmlrpclistener.cpp | 2 +- indra/newview/llxmlrpctransaction.cpp | 15 +--- indra/viewer_components/login/lllogin.cpp | 2 +- 103 files changed, 506 insertions(+), 514 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index b82734615f..be1c74a908 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1229,7 +1229,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints) { bool old_version = false; - std::unique_ptr joint_motion_list(new LLKeyframeMotion::JointMotionList); + std::unique_ptr joint_motion_list = std::make_unique(); //------------------------------------------------------------------------- // get base priority @@ -1826,7 +1826,7 @@ bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo for(S32 i = 0; i < num_constraints; ++i) { // read in constraint data - std::unique_ptr constraintp(new JointConstraintSharedData); + std::unique_ptr constraintp = std::make_unique(); U8 byte = 0; if (!dp.unpackU8(byte, "chain_length")) diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index 01763c49aa..eeff2694a7 100644 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -154,7 +154,7 @@ LLVolatileAPRPool::LLVolatileAPRPool(bool is_local, apr_pool_t *parent, apr_size //create mutex if(!is_local) //not a local apr_pool, that is: shared by multiple threads. { - mMutexp.reset(new std::mutex()); + mMutexp = std::make_unique(); } } diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp index ada6b9519e..1614cc6e57 100644 --- a/indra/llcommon/llleap.cpp +++ b/indra/llcommon/llleap.cpp @@ -61,7 +61,7 @@ public: // Pass it a callback to our connect() method, so it can send events // from a particular LLEventPump to the plugin without having to know // this class or method name. - mListener(new LLLeapListener( + mListener(std::make_unique( [this](LLEventPump& pump, const std::string& listener) { return connect(pump, listener); })) { diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index db716b1431..7dd8256e72 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -1234,9 +1234,9 @@ void LLStringUtilBase::getTokens(const string_type& string, std::vector > instrp; if (escapes.empty()) - instrp.reset(new LLStringUtilBaseImpl::InString(string.begin(), string.end())); + instrp = std::make_unique>(string.begin(), string.end()); else - instrp.reset(new LLStringUtilBaseImpl::InEscString(string.begin(), string.end(), escapes)); + instrp = std::make_unique>(string.begin(), string.end(), escapes); LLStringUtilBaseImpl::getTokens(*instrp, tokens, drop_delims, keep_delims, quotes); } diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index 081a4d9bac..1edc6f52ee 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -272,7 +272,7 @@ void HttpOpRequest::visitNotifier(HttpRequest * request) response->setContentType(mReplyConType); response->setRetries(mPolicyRetries, mPolicy503Retries); - HttpResponse::TransferStats::ptr_t stats = HttpResponse::TransferStats::ptr_t(new HttpResponse::TransferStats); + HttpResponse::TransferStats::ptr_t stats = std::make_shared(); curl_easy_getinfo(mCurlHandle, CURLINFO_SIZE_DOWNLOAD, &stats->mSizeDownload); curl_easy_getinfo(mCurlHandle, CURLINFO_TOTAL_TIME, &stats->mTotalTime); @@ -964,7 +964,7 @@ size_t HttpOpRequest::headerCallback(void * data, size_t size, size_t nmemb, voi // Save headers in response if (! op->mReplyHeaders) { - op->mReplyHeaders = HttpHeaders::ptr_t(new HttpHeaders); + op->mReplyHeaders = std::make_shared(); } op->mReplyHeaders->append(name, value ? value : ""); } diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h index 511a17e000..ec0e538cf7 100644 --- a/indra/llcorehttp/httpcommon.h +++ b/indra/llcorehttp/httpcommon.h @@ -297,25 +297,25 @@ struct HttpStatus HttpStatus() { - mDetails = std::shared_ptr
(new Details(LLCORE, HE_SUCCESS)); + mDetails = std::make_shared
(LLCORE, HE_SUCCESS); } HttpStatus(type_enum_t type, short status) { - mDetails = std::shared_ptr
(new Details(type, status)); + mDetails = std::make_shared
(type, status); } HttpStatus(int http_status) { - mDetails = std::shared_ptr
(new Details(http_status, - (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR)); + mDetails = std::make_shared
(http_status, + (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR); llassert(http_status >= 100 && http_status <= 999); } HttpStatus(int http_status, const std::string &message) { - mDetails = std::shared_ptr
(new Details(http_status, - (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR)); + mDetails = std::make_shared
(http_status, + (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR); llassert(http_status >= 100 && http_status <= 999); mDetails->mMessage = message; } @@ -337,7 +337,7 @@ struct HttpStatus HttpStatus & clone(const HttpStatus &rhs) { - mDetails = std::shared_ptr
(new Details(*rhs.mDetails)); + mDetails = std::make_shared
(*rhs.mDetails); return *this; } diff --git a/indra/llcorehttp/httprequest.cpp b/indra/llcorehttp/httprequest.cpp index 2aaf71f8a4..d8fcd6a03f 100644 --- a/indra/llcorehttp/httprequest.cpp +++ b/indra/llcorehttp/httprequest.cpp @@ -60,7 +60,7 @@ HttpRequest::HttpRequest() mRequestQueue = HttpRequestQueue::instanceOf(); mRequestQueue->addRef(); - mReplyQueue.reset( new HttpReplyQueue() ); + mReplyQueue = std::make_shared(); HTTPStats::instance().recordHTTPRequest(); } @@ -129,7 +129,7 @@ HttpHandle HttpRequest::setPolicyOption(EPolicyOption opt, policy_t pclass, { HttpStatus status; - HttpOpSetGet::ptr_t op(new HttpOpSetGet()); + HttpOpSetGet::ptr_t op = std::make_shared(); if (! (status = op->setupSet(opt, pclass, value))) { mLastReqStatus = status; @@ -152,7 +152,7 @@ HttpHandle HttpRequest::setPolicyOption(EPolicyOption opt, policy_t pclass, { HttpStatus status; - HttpOpSetGet::ptr_t op (new HttpOpSetGet()); + HttpOpSetGet::ptr_t op = std::make_shared(); if (! (status = op->setupSet(opt, pclass, value))) { mLastReqStatus = status; @@ -190,7 +190,7 @@ HttpHandle HttpRequest::requestGet(policy_t policy_id, LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; HttpStatus status; - HttpOpRequest::ptr_t op(new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared(); if (! (status = op->setupGet(policy_id, url, options, headers))) { mLastReqStatus = status; @@ -219,7 +219,7 @@ HttpHandle HttpRequest::requestGetByteRange(policy_t policy_id, LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; HttpStatus status; - HttpOpRequest::ptr_t op(new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared(); if (! (status = op->setupGetByteRange(policy_id, url, offset, len, options, headers))) { mLastReqStatus = status; @@ -246,7 +246,7 @@ HttpHandle HttpRequest::requestPost(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op(new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared(); if (! (status = op->setupPost(policy_id, url, body, options, headers))) { mLastReqStatus = status; @@ -273,7 +273,7 @@ HttpHandle HttpRequest::requestPut(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op (new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared(); if (! (status = op->setupPut(policy_id, url, body, options, headers))) { mLastReqStatus = status; @@ -298,7 +298,7 @@ HttpHandle HttpRequest::requestDelete(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op(new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared(); if (!(status = op->setupDelete(policy_id, url, options, headers))) { mLastReqStatus = status; @@ -324,7 +324,7 @@ HttpHandle HttpRequest::requestPatch(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op (new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared(); if (!(status = op->setupPatch(policy_id, url, body, options, headers))) { mLastReqStatus = status; @@ -349,7 +349,7 @@ HttpHandle HttpRequest::requestCopy(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op(new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared(); if (!(status = op->setupCopy(policy_id, url, options, headers))) { mLastReqStatus = status; @@ -375,7 +375,7 @@ HttpHandle HttpRequest::requestMove(policy_t policy_id, { HttpStatus status; - HttpOpRequest::ptr_t op (new HttpOpRequest()); + HttpOpRequest::ptr_t op = std::make_shared(); if (!(status = op->setupMove(policy_id, url, options, headers))) { mLastReqStatus = status; @@ -397,7 +397,7 @@ HttpHandle HttpRequest::requestNoOp(HttpHandler::ptr_t user_handler) { HttpStatus status; - HttpOperation::ptr_t op (new HttpOpNull()); + HttpOperation::ptr_t op = std::make_shared(); op->setReplyPath(mReplyQueue, user_handler); if (! (status = mRequestQueue->addOp(op))) // transfers refcount { @@ -463,7 +463,7 @@ HttpHandle HttpRequest::requestCancel(HttpHandle request, HttpHandler::ptr_t use { HttpStatus status; - HttpOperation::ptr_t op(new HttpOpCancel(request)); + HttpOperation::ptr_t op = std::make_shared(request); op->setReplyPath(mReplyQueue, user_handler); if (! (status = mRequestQueue->addOp(op))) // transfers refcount { @@ -528,7 +528,7 @@ HttpHandle HttpRequest::requestStopThread(HttpHandler::ptr_t user_handler) HttpStatus status; HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); - HttpOperation::ptr_t op(new HttpOpStop()); + HttpOperation::ptr_t op = std::make_shared(); op->setReplyPath(mReplyQueue, user_handler); if (! (status = mRequestQueue->addOp(op))) // transfers refcount { @@ -548,7 +548,7 @@ HttpHandle HttpRequest::requestSpin(int mode) HttpStatus status; HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); - HttpOperation::ptr_t op(new HttpOpSpin(mode)); + HttpOperation::ptr_t op = std::make_shared(mode); op->setReplyPath(mReplyQueue, HttpHandler::ptr_t()); if (! (status = mRequestQueue->addOp(op))) // transfers refcount { diff --git a/indra/llcorehttp/httprequest.h b/indra/llcorehttp/httprequest.h index e6e051410e..db5d5fa096 100644 --- a/indra/llcorehttp/httprequest.h +++ b/indra/llcorehttp/httprequest.h @@ -104,9 +104,9 @@ public: /// Represents a default, catch-all policy class that guarantees /// eventual service for any HTTP request. - static const policy_t DEFAULT_POLICY_ID = 0; - static const policy_t INVALID_POLICY_ID = 0xFFFFFFFFU; - static const policy_t GLOBAL_POLICY_ID = 0xFFFFFFFEU; + static constexpr policy_t DEFAULT_POLICY_ID = 0; + static constexpr policy_t INVALID_POLICY_ID = 0xFFFFFFFFU; + static constexpr policy_t GLOBAL_POLICY_ID = 0xFFFFFFFEU; /// Create a new policy class into which requests can be made. /// diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index bdaef0c653..46ab6a441e 100644 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -67,7 +67,7 @@ private: LLImageDecodeThread::LLImageDecodeThread(bool /*threaded*/) : mDecodeCount(0) { - mThreadPool.reset(new LL::ThreadPool("ImageDecode", 8)); + mThreadPool = std::make_unique("ImageDecode", 8); mThreadPool->start(); } diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index 9b4454a847..ebafc53a4d 100644 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -117,9 +117,9 @@ LLAvatarNameCache::LLAvatarNameCache() mUsePeopleAPI = true; - sHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest()); - sHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()); - sHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()); + sHttpRequest = std::make_shared(); + sHttpHeaders = std::make_shared(); + sHttpOptions = std::make_shared(); sHttpPolicy = LLCore::HttpRequest::DEFAULT_POLICY_ID; } diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 5c7b1c4235..cd04d6f160 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -195,7 +195,7 @@ void LLCoprocedureManager::initializePool(const std::string &poolName, size_t qu LL_WARNS("CoProcMgr") << "LLCoprocedureManager: No setting for \"" << keyName << "\" setting pool size to default of " << size << LL_ENDL; } - poolPtr_t pool(new LLCoprocedurePool(poolName, size, queue_size)); + poolPtr_t pool = std::make_shared(poolName, size, queue_size); LL_ERRS_IF(!pool, "CoprocedureManager") << "Unable to create pool named \"" << poolName << "\" FATAL!" << LL_ENDL; bool inserted = mPoolMap.emplace(poolName, pool).second; @@ -365,7 +365,7 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size, s for (size_t count = 0; count < mPoolSize; ++count) { - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter( mPoolName + "Adapter", mHTTPPolicy)); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared(mPoolName + "Adapter", mHTTPPolicy); std::string pooledCoro = LLCoros::instance().launch( "LLCoprocedurePool("+mPoolName+")::coprocedureInvokerCoro", diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 992e145758..28d9339bcf 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -666,9 +666,9 @@ const std::string HttpCoroutineAdapter::HTTP_RESULTS_HEADERS("headers"); const std::string HttpCoroutineAdapter::HTTP_RESULTS_CONTENT("content"); const std::string HttpCoroutineAdapter::HTTP_RESULTS_RAW("raw"); -HttpCoroutineAdapter::HttpCoroutineAdapter(const std::string &name, +HttpCoroutineAdapter::HttpCoroutineAdapter(std::string name, LLCore::HttpRequest::policy_t policyId) : - mAdapterName(name), + mAdapterName(std::move(name)), mPolicyId(policyId), mYieldingHandle(LLCORE_HTTP_HANDLE_INVALID), mWeakRequest(), @@ -686,7 +686,7 @@ LLSD HttpCoroutineAdapter::postAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); return postAndSuspend_(request, url, body, options, headers, httpHandler); } @@ -723,7 +723,7 @@ LLSD HttpCoroutineAdapter::postAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); return postAndSuspend_(request, url, rawbody, options, headers, httpHandler); } @@ -733,7 +733,7 @@ LLSD HttpCoroutineAdapter::postRawAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroRawHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); return postAndSuspend_(request, url, rawbody, options, headers, httpHandler); } @@ -797,7 +797,7 @@ LLSD HttpCoroutineAdapter::postJsonAndSuspend(LLCore::HttpRequest::ptr_t request LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroJSONHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); LLCore::BufferArray::ptr_t rawbody(new LLCore::BufferArray); @@ -846,7 +846,7 @@ LLSD HttpCoroutineAdapter::putAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); return putAndSuspend_(request, url, body, options, headers, httpHandler); } @@ -856,7 +856,7 @@ LLSD HttpCoroutineAdapter::putJsonAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName, true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroJSONHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); LLCore::BufferArray::ptr_t rawbody(new LLCore::BufferArray); @@ -931,7 +931,7 @@ LLSD HttpCoroutineAdapter::getAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); return getAndSuspend_(request, url, options, headers, httpHandler); } @@ -941,7 +941,7 @@ LLSD HttpCoroutineAdapter::getRawAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroRawHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); return getAndSuspend_(request, url, options, headers, httpHandler); } @@ -950,7 +950,7 @@ LLSD HttpCoroutineAdapter::getJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroJSONHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); return getAndSuspend_(request, url, options, headers, httpHandler); } @@ -987,7 +987,7 @@ LLSD HttpCoroutineAdapter::deleteAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); return deleteAndSuspend_(request, url, options, headers, httpHandler); } @@ -997,7 +997,7 @@ LLSD HttpCoroutineAdapter::deleteJsonAndSuspend(LLCore::HttpRequest::ptr_t reque LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroJSONHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); return deleteAndSuspend_(request, url, options, headers, httpHandler); } @@ -1032,7 +1032,7 @@ LLSD HttpCoroutineAdapter::patchAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); return patchAndSuspend_(request, url, body, options, headers, httpHandler); } @@ -1070,10 +1070,10 @@ LLSD HttpCoroutineAdapter::copyAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); if (!headers) - headers.reset(new LLCore::HttpHeaders); + headers = std::make_shared(); headers->append(HTTP_OUT_HEADER_DESTINATION, dest); return copyAndSuspend_(request, url, options, headers, httpHandler); @@ -1112,10 +1112,10 @@ LLSD HttpCoroutineAdapter::moveAndSuspend(LLCore::HttpRequest::ptr_t request, LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers) { LLEventStream replyPump(mAdapterName + "Reply", true); - HttpCoroHandler::ptr_t httpHandler(new HttpCoroLLSDHandler(replyPump)); + HttpCoroHandler::ptr_t httpHandler = std::make_shared(replyPump); if (!headers) - headers.reset(new LLCore::HttpHeaders); + headers = std::make_shared(); headers->append(HTTP_OUT_HEADER_DESTINATION, dest); return moveAndSuspend_(request, url, options, headers, httpHandler); @@ -1153,7 +1153,7 @@ LLSD HttpCoroutineAdapter::moveAndSuspend_(LLCore::HttpRequest::ptr_t &request, void HttpCoroutineAdapter::checkDefaultHeaders(LLCore::HttpHeaders::ptr_t &headers) { if (!headers) - headers.reset(new LLCore::HttpHeaders); + headers = std::make_shared(); if (!headers->find(HTTP_OUT_HEADER_ACCEPT)) { headers->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_LLSD_XML); @@ -1247,9 +1247,9 @@ void HttpCoroutineAdapter::messageHttpGet(const std::string &url, const std::str void HttpCoroutineAdapter::trivialGetCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericGetCoro", policyId)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("genericGetCoro", policyId); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); @@ -1298,9 +1298,9 @@ void HttpCoroutineAdapter::messageHttpPost(const std::string &url, const LLSD &p void HttpCoroutineAdapter::trivialPostCoro(std::string url, LLCore::HttpRequest::policy_t policyId, LLSD postData, completionCallback_t success, completionCallback_t failure) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", policyId)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("genericPostCoro", policyId); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); @@ -1342,9 +1342,9 @@ void HttpCoroutineAdapter::callbackHttpDel(const std::string &url, LLCore::HttpR void HttpCoroutineAdapter::trivialDelCoro(std::string url, LLCore::HttpRequest::policy_t policyId, completionCallback_t success, completionCallback_t failure) { - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericDelCoro", policyId)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared("genericDelCoro", policyId); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h index 45b673b9d5..111fa6a1a0 100644 --- a/indra/llmessage/llcorehttputil.h +++ b/indra/llmessage/llcorehttputil.h @@ -320,7 +320,7 @@ public: typedef std::shared_ptr ptr_t; typedef std::weak_ptr wptr_t; - HttpCoroutineAdapter(const std::string &name, LLCore::HttpRequest::policy_t policyId); + HttpCoroutineAdapter(std::string name, LLCore::HttpRequest::policy_t policyId); ~HttpCoroutineAdapter(); /// Execute a Post transaction on the supplied URL and yield execution of @@ -330,19 +330,19 @@ public: /// not be deallocated during the yield. LLSD postAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD postAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD postAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t &headers) { return postAndSuspend(request, url, body, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } LLSD postAndSuspend(LLCore::HttpRequest::ptr_t &request, @@ -350,59 +350,59 @@ public: LLCore::HttpHeaders::ptr_t &headers) { return postAndSuspend(request, url, rawbody, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } LLSD postRawAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::BufferArray::ptr_t rawbody, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD postRawAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::BufferArray::ptr_t &rawbody, LLCore::HttpHeaders::ptr_t &headers) { return postRawAndSuspend(request, url, rawbody, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } LLSD postFileAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, std::string fileName, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD postFileAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, std::string fileName, LLCore::HttpHeaders::ptr_t &headers) { return postFileAndSuspend(request, url, fileName, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } LLSD postFileAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLUUID assetId, LLAssetType::EType assetType, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD postFileAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLUUID assetId, LLAssetType::EType assetType, LLCore::HttpHeaders::ptr_t &headers) { return postFileAndSuspend(request, url, assetId, assetType, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } LLSD postJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD postJsonAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t &headers) { return postJsonAndSuspend(request, url, body, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } @@ -414,27 +414,27 @@ public: /// not be deallocated during the yield. LLSD putAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD putAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t headers) { return putAndSuspend(request, url, body, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } LLSD putJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD putJsonAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t &headers) { return putJsonAndSuspend(request, url, body, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } /// Execute a Get transaction on the supplied URL and yield execution of @@ -445,25 +445,25 @@ public: /// LLSD getAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD getAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { return getAndSuspend(request, url, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), + std::make_shared(), headers); } LLSD getRawAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD getRawAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { return getRawAndSuspend(request, url, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), + std::make_shared(), headers); } @@ -473,13 +473,13 @@ public: /// before being returned to the caller. LLSD getJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD getJsonAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, LLCore::HttpHeaders::ptr_t &headers) { return getJsonAndSuspend(request, url, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), + std::make_shared(), headers); } @@ -491,13 +491,13 @@ public: /// not be deallocated during the yield. LLSD deleteAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD deleteAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpHeaders::ptr_t headers) { return deleteAndSuspend(request, url, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), + std::make_shared(), headers); } @@ -507,13 +507,13 @@ public: /// before being returned to the caller. LLSD deleteJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD deleteJsonAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, LLCore::HttpHeaders::ptr_t headers) { return deleteJsonAndSuspend(request, url, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), + std::make_shared(), headers); } @@ -525,14 +525,14 @@ public: /// not be deallocated during the yield. LLSD patchAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD patchAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const LLSD & body, LLCore::HttpHeaders::ptr_t &headers) { return patchAndSuspend(request, url, body, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } /// Execute a COPY transaction on the supplied URL and yield execution of @@ -545,14 +545,14 @@ public: /// not be deallocated during the yield. LLSD copyAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const std::string dest, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD copyAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const std::string & dest, LLCore::HttpHeaders::ptr_t &headers) { return copyAndSuspend(request, url, dest, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } /// Execute a MOVE transaction on the supplied URL and yield execution of @@ -565,14 +565,14 @@ public: /// not be deallocated during the yield. LLSD moveAndSuspend(LLCore::HttpRequest::ptr_t request, const std::string & url, const std::string dest, - LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), - LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders())); + LLCore::HttpOptions::ptr_t options = std::make_shared(), + LLCore::HttpHeaders::ptr_t headers = std::make_shared()); LLSD moveAndSuspend(LLCore::HttpRequest::ptr_t &request, const std::string & url, const std::string & dest, LLCore::HttpHeaders::ptr_t &headers) { return moveAndSuspend(request, url, dest, - LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers); + std::make_shared(), headers); } /// diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index 78cca47456..c8e0d8a671 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -249,7 +249,7 @@ const LLExperienceCache::cache_t& LLExperienceCache::getCached() void LLExperienceCache::requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, std::string url, RequestQueue_t requests) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); //LL_INFOS("requestExperiencesCoro") << "url: " << url << LL_ENDL; @@ -527,7 +527,7 @@ void LLExperienceCache::get(const LLUUID& key, LLExperienceCache::ExperienceGetF fetch(key); - signal_ptr signal = signal_ptr(new callback_signal_t()); + signal_ptr signal = std::make_shared(); std::pair result = mSignalMap.insert(signal_map_t::value_type(key, signal)); if (!result.second) @@ -562,7 +562,7 @@ void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const void LLExperienceCache::fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID objectId, LLUUID itemId, std::string url, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); if (url.empty()) { @@ -624,7 +624,7 @@ void LLExperienceCache::findExperienceByName(const std::string text, int page, E void LLExperienceCache::findExperienceByNameCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, std::string text, int page, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); std::ostringstream url; @@ -667,7 +667,7 @@ void LLExperienceCache::getGroupExperiences(const LLUUID &groupId, ExperienceGet void LLExperienceCache::getGroupExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID groupId, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); // search for experiences owned by the current group std::string url = mCapability("GroupExperiences"); @@ -710,7 +710,7 @@ void LLExperienceCache::setRegionExperiences(CapabilityQuery_t regioncaps, const void LLExperienceCache::regionExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, CapabilityQuery_t regioncaps, bool update, LLSD experiences, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); // search for experiences owned by the current group std::string url = regioncaps("RegionExperiences"); @@ -822,7 +822,7 @@ void LLExperienceCache::forgetExperiencePermission(const LLUUID &experienceId, E void LLExperienceCache::experiencePermissionCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, permissionInvoker_fn invokerfn, std::string url, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); // search for experiences owned by the current group @@ -853,7 +853,7 @@ void LLExperienceCache::getExperienceAdmin(const LLUUID &experienceId, Experienc void LLExperienceCache::getExperienceAdminCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID experienceId, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); std::string url = mCapability("IsExperienceAdmin"); if (url.empty()) @@ -885,7 +885,7 @@ void LLExperienceCache::updateExperience(LLSD updateData, ExperienceGetFn_t fn) void LLExperienceCache::updateExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLSD updateData, ExperienceGetFn_t fn) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); std::string url = mCapability("UpdateExperience"); if (url.empty()) diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index ad1ff86807..2a619dab98 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -913,7 +913,7 @@ LLStoredMessagePtr LLMessageSystem::getReceivedMessage() const const std::string& name = mMessageReader->getMessageName(); LLSD message = wrapReceivedTemplateData(); - return LLStoredMessagePtr(new LLStoredMessage(name, message)); + return std::make_shared(name, message); } LLStoredMessagePtr LLMessageSystem::getBuiltMessage() const @@ -921,7 +921,7 @@ LLStoredMessagePtr LLMessageSystem::getBuiltMessage() const const std::string& name = mMessageBuilder->getMessageName(); LLSD message = wrapBuiltTemplateData(); - return LLStoredMessagePtr(new LLStoredMessage(name, message)); + return std::make_shared(name, message); } S32 LLMessageSystem::sendMessage(const LLHost &host, LLStoredMessagePtr message) @@ -4028,9 +4028,9 @@ void LLMessageSystem::sendUntrustedSimulatorMessageCoro(std::string url, std::st { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("untrustedSimulatorMessage", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared("untrustedSimulatorMessage", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); if (url.empty()) diff --git a/indra/llmessage/tests/llcoproceduremanager_test.cpp b/indra/llmessage/tests/llcoproceduremanager_test.cpp index 4caae5f082..0a77fd218b 100644 --- a/indra/llmessage/tests/llcoproceduremanager_test.cpp +++ b/indra/llmessage/tests/llcoproceduremanager_test.cpp @@ -48,7 +48,7 @@ #pragma warning(disable: 4702) #endif -LLCoreHttpUtil::HttpCoroutineAdapter::HttpCoroutineAdapter(std::string const&, unsigned int) +LLCoreHttpUtil::HttpCoroutineAdapter::HttpCoroutineAdapter(std::string name, LLCore::HttpRequest::policy_t policyId) { } diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index 2865b789b9..07e8b890b8 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -432,11 +432,11 @@ public: virtual SortType& getSorter() { return *mSorter; } virtual const SortType& getSorter() const { return *mSorter; } - virtual void setSorter(const SortType& sorter) { mSorter.reset(new SortType(sorter)); requestSortAll(); } + virtual void setSorter(const SortType& sorter) { mSorter = std::make_unique(sorter); requestSortAll(); } virtual FilterType& getFilter() override { return *mFilter; } virtual const FilterType& getFilter() const override { return *mFilter; } - virtual void setFilter(const FilterType& filter) { mFilter.reset(new FilterType(filter)); } + virtual void setFilter(const FilterType& filter) { mFilter = std::make_unique(filter); } // By default, we assume the content is available. If a network fetch mechanism is implemented for the model, // this method needs to be overloaded and return the relevant fetch status. diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index a05feab1d9..0ffe6cff5e 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -457,7 +457,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par mTags.push_back(tag.value); } - mForm = LLNotificationFormPtr(new LLNotificationForm(p.name, p.form_ref.form)); + mForm = std::make_shared(p.name, p.form_ref.form); } LLNotificationVisibilityRule::LLNotificationVisibilityRule(const LLNotificationVisibilityRule::Rule &p) @@ -875,7 +875,7 @@ void LLNotification::init(const std::string& template_name, const LLSD& form_ele // TODO: something like this so that a missing alert is sensible: //mSubstitutions["_ARGS"] = get_all_arguments_as_text(mSubstitutions); - mForm = LLNotificationFormPtr(new LLNotificationForm(*mTemplatep->mForm)); + mForm = std::make_shared(*mTemplatep->mForm); mForm->append(form_elements); // apply substitution to form labels @@ -1249,7 +1249,7 @@ LLNotifications::LLNotifications() : LLNotificationChannelBase(LLNotificationFilters::includeEverything), mIgnoreAllNotifications(false) { - mListener.reset(new LLNotificationsListener(*this)); + mListener = std::make_unique(*this); LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Notification.Show", boost::bind(&LLNotifications::addFromCallback, this, _2)); // touch the instance tracker for notification channels, so that it will still be around in our destructor @@ -1487,7 +1487,7 @@ bool LLNotifications::templateExists(std::string_view name) void LLNotifications::forceResponse(const LLNotification::Params& params, S32 option) { - LLNotificationPtr temp_notify(new LLNotification(params)); + LLNotificationPtr temp_notify = std::make_shared(params); if (!temp_notify->getForm()) { @@ -1653,7 +1653,7 @@ bool LLNotifications::loadTemplates() replaceFormText(notification.form_ref.form, "$ignoretext", notification.form_ref.form_template.ignore_text); } } - mTemplates[notification.name] = LLNotificationTemplatePtr(new LLNotificationTemplate(notification)); + mTemplates[notification.name] = std::make_shared(notification); } LL_INFOS("Notifications") << "...done" << LL_ENDL; @@ -1683,7 +1683,7 @@ bool LLNotifications::loadVisibilityRules() for (const LLNotificationVisibilityRule::Rule& rule : params.rules) { - mVisibilityRules.push_back(LLNotificationVisibilityRulePtr(new LLNotificationVisibilityRule(rule))); + mVisibilityRules.push_back(std::make_shared(rule)); } return true; @@ -1726,7 +1726,7 @@ LLNotificationPtr LLNotifications::add(const std::string& name, const LLSD& subs // generalized add function that takes a parameter block object for more complex instantiations LLNotificationPtr LLNotifications::add(const LLNotification::Params& p) { - LLNotificationPtr pNotif(new LLNotification(p)); + LLNotificationPtr pNotif = std::make_shared(p); add(pNotif); return pNotif; } @@ -1834,7 +1834,7 @@ void LLNotifications::update(const LLNotificationPtr pNotif) LLNotificationPtr LLNotifications::find(LLUUID uuid) { - LLNotificationPtr target = LLNotificationPtr(new LLNotification(LLNotification::Params().id(uuid))); + LLNotificationPtr target = std::make_shared(LLNotification::Params().id(uuid)); LLNotificationSet::iterator it=mItems.find(target); if (it == mItems.end()) { diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp index 9c1fc27c51..d07d42bdba 100644 --- a/indra/llui/llnotificationslistener.cpp +++ b/indra/llui/llnotificationslistener.cpp @@ -266,7 +266,7 @@ void LLNotificationsListener::forward(const LLSD& params) entry(mForwarders.insert(ForwarderMap::value_type(channel, ForwarderMap::mapped_type())).first); if (! entry->second) { - entry->second.reset(new Forwarder(mNotifications, channel)); + entry->second = std::make_shared(mNotifications, channel); } // Now, whether this Forwarder is brand-new or not, update it with the new // request info. diff --git a/indra/newview/llaccountingcostmanager.cpp b/indra/newview/llaccountingcostmanager.cpp index 54d8ceb85a..b30fe16c58 100644 --- a/indra/newview/llaccountingcostmanager.cpp +++ b/indra/newview/llaccountingcostmanager.cpp @@ -53,8 +53,8 @@ void LLAccountingCostManager::accountingCostCoro(std::string url, LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AccountingCost", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("accountingCostCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); try { diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index e95d192f72..a05261e430 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -464,7 +464,7 @@ LLAgent::LLAgent() : mControlsTakenPassedOnCount[i] = 0; } - mListener.reset(new LLAgentListener(*this)); + mListener = std::make_shared(*this); addParcelChangedCallback(&setCanEditParcel); @@ -4700,9 +4700,9 @@ void LLAgent::requestAgentUserInfoCoro(std::string capurl) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAgentUserInfoCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("requestAgentUserInfoCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOpts->setFollowRedirects(true); @@ -4760,9 +4760,9 @@ void LLAgent::updateAgentUserInfoCoro(std::string capurl, std::string directory_ { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAgentUserInfoCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("requestAgentUserInfoCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOpts->setFollowRedirects(true); diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 5114ac8a08..eecd42d427 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -861,8 +861,8 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht return; } - LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpOptions::ptr_t httpOptions = std::make_shared(); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOptions->setTimeout(HTTP_TIMEOUT); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 0d57b33a51..f65aaccddc 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3908,7 +3908,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd LL_DEBUGS("Avatar") << "Will send request for cof_version " << cofVersion << LL_ENDL; bRetry = false; - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure")) { @@ -4379,8 +4379,8 @@ LLAppearanceMgr::LLAppearanceMgr(): outfit_observer.addCOFSavedCallback(boost::bind( &LLAppearanceMgr::setOutfitLocked, this, false)); - mUnlockOutfitTimer.reset(new LLOutfitUnLockTimer((F32)gSavedSettings.getS32( - "OutfitOperationsTimeout"))); + mUnlockOutfitTimer = std::make_unique((F32)gSavedSettings.getS32( + "OutfitOperationsTimeout")); gIdleCallbacks.addFunction(&LLAttachmentsMgr::onIdle, NULL); gIdleCallbacks.addFunction(&LLAppearanceMgr::onIdle, NULL); //sheduling appearance update requests diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index 7dce627044..9d9948731f 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -269,11 +269,11 @@ void LLAvatarPropertiesProcessor::requestAvatarPropertiesCoro(std::string cap_ur LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestAvatarPropertiesCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("requestAvatarPropertiesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setFollowRedirects(true); std::string finalUrl = cap_url + "/" + avatar_id.asString(); diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 44f35981b0..309bed6f8b 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -77,9 +77,9 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64 { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("AvatarRenderInfoAccountant", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); // Going to request each 15 seconds either way, so don't wait // too long and don't repeat @@ -194,9 +194,9 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("AvatarRenderInfoAccountant", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("AvatarRenderInfoAccountant", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); // Going to request each 60+ seconds, timeout is 30s. // Don't repeat too often, will be sending newer data soon diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 552ea75559..e0236ca618 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -467,7 +467,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat std::string url = object->getRegion()->getCapability("UpdateScriptTask"); { - LLResourceUploadInfo::ptr_t uploadInfo(new LLQueuedScriptAssetUpload(object->getID(), + LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared(object->getID(), inventory->getUUID(), assetId, monocompile ? LLScriptAssetUpload::MONO : LLScriptAssetUpload::LSL2, @@ -475,7 +475,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat inventory->getName(), LLUUID(), experienceId, - boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _4))); + boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _4)); LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo); } diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 875dac103c..938791d6d7 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -2022,8 +2022,8 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("ResetEnvironment", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); std::string url = gAgent.getRegionCapability("ExtEnvironment"); if (url.empty()) @@ -2070,8 +2070,8 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("ResetEnvironment", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); std::string url = gAgent.getRegionCapability("ExtEnvironment"); if (url.empty()) @@ -2186,8 +2186,8 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("ResetEnvironment", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("ResetEnvironment", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); std::string url = gAgent.getRegionCapability("ExtEnvironment"); if (url.empty()) @@ -3418,8 +3418,8 @@ namespace { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("testExperiencesOnParcelCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("testExperiencesOnParcelCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); std::string url = gAgent.getRegionCapability("ExperienceQuery"); if (url.empty()) diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp index a7d18d85ce..54be045c3d 100644 --- a/indra/newview/llestateinfomodel.cpp +++ b/indra/newview/llestateinfomodel.cpp @@ -138,8 +138,8 @@ void LLEstateInfoModel::commitEstateInfoCapsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EstateChangeInfo", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("EstateChangeInfo", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD body; body["estate_name"] = getName(); diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 86c58a3497..de3752d879 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -90,7 +90,7 @@ namespace Details { LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp()); - mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest); + mHttpRequest = std::make_shared(); mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_LONG_POLL); mSenderIp = sender.getIPandPort(); } @@ -144,7 +144,7 @@ namespace Details void LLEventPollImpl::eventPollCoro(std::string url) { - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EventPoller", mHttpPolicy)); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared("EventPoller", mHttpPolicy); LLSD acknowledge; int errorCount = 0; int counter = mCounter; // saved on the stack for logging. @@ -156,7 +156,7 @@ namespace Details // This is a loop with its own waitToRetry implementation, // so disable retries. - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setRetries(0); LL::WorkQueue::ptr_t main_queue = nullptr; diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index a6419f5ad4..05f6c4a867 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -105,7 +105,7 @@ private: static const std::string sCheckUpdateListenerName; static void startFetchServerReleaseNotes(); - static void fetchServerReleaseNotesCoro(const std::string& cap_url); + static void fetchServerReleaseNotesCoro(const std::string cap_url); static void handleServerReleaseNotes(LLSD results); }; @@ -227,12 +227,12 @@ void LLFloaterAbout::startFetchServerReleaseNotes() } /*static*/ -void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string& cap_url) +void LLFloaterAbout::fetchServerReleaseNotesCoro(const std::string cap_url) { LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("fetchServerReleaseNotesCoro", LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("fetchServerReleaseNotesCoro", LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(false); diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index fd9bbf00ae..c7851013c7 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -410,9 +410,9 @@ void LLFloaterAvatarPicker::findByIdCoro(std::string url, LLUUID query_id, LLUUI { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("findByIdCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("findByIdCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setTimeout(AVATAR_PICKER_SEARCH_TIMEOUT); @@ -445,9 +445,9 @@ void LLFloaterAvatarPicker::findByNameCoro(std::string url, LLUUID queryID, std: { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("findByNameCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("findByNameCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); LL_INFOS("HttpCoroutineAdapter", "genericPostCoro", "Agent") << "Generic POST for " << url << LL_ENDL; diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 392079efe4..3acf28044c 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -1021,7 +1021,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata) std::string desc = floaterp->getChild("description_form")->getValue().asString(); S32 expected_upload_cost = LLAgentBenefitsMgr::current().getAnimationUploadCost(); - LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared( floaterp->mTransactionID, LLAssetType::AT_ANIMATION, name, desc, 0, LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION, @@ -1029,7 +1029,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata) LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), expected_upload_cost, - floaterp->mDestinationFolderId)); + floaterp->mDestinationFolderId); upload_new_resource(assetUploadInfo); } diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp index 9e00fb0fbb..f4cb3a04f5 100644 --- a/indra/newview/llfloaterexperiences.cpp +++ b/indra/newview/llfloaterexperiences.cpp @@ -366,10 +366,10 @@ void LLFloaterExperiences::retrieveExperienceListCoro(std::string url, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("retrieveExperienceListCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("retrieveExperienceListCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOptions = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); if (url.empty()) diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index b6b844b307..e8e36b5c93 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -90,10 +90,10 @@ void LLFloaterGridStatus::getGridStatusRSSCoro() LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getGridStatusRSSCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("getGridStatusRSSCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); httpOpts->setSSLVerifyPeer(false); // We want this data even if SSL fails httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 82b5fd23fc..bbff3e4c86 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -280,7 +280,7 @@ void LLFloaterImagePreview::onBtnOK() LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE); fmt_file.write(formatted->getData(), formatted->getDataSize()); - LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared( tid, LLAssetType::AT_TEXTURE, getChild("name_form")->getValue().asString(), getChild("description_form")->getValue().asString(), @@ -291,7 +291,7 @@ void LLFloaterImagePreview::onBtnOK() LLFloaterPerms::getEveryonePerms("Uploads"), expected_upload_cost, mDestinationFolderId - )); + ); upload_new_resource(assetUploadInfo); } diff --git a/indra/newview/llfloatermodeluploadbase.cpp b/indra/newview/llfloatermodeluploadbase.cpp index ec4f7593ca..dd53d0ffcf 100644 --- a/indra/newview/llfloatermodeluploadbase.cpp +++ b/indra/newview/llfloatermodeluploadbase.cpp @@ -66,8 +66,8 @@ void LLFloaterModelUploadBase::requestAgentUploadPermissionsCoro(std::string url { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("MeshUploadFlag", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("MeshUploadFlag", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llfloatermyscripts.cpp b/indra/newview/llfloatermyscripts.cpp index 0283855f15..8685243867 100644 --- a/indra/newview/llfloatermyscripts.cpp +++ b/indra/newview/llfloatermyscripts.cpp @@ -93,8 +93,8 @@ void LLFloaterMyScripts::getAttachmentLimitsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getAttachmentLimitsCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("getAttachmentLimitsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index e4e7c4ee39..c557c25d65 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -154,7 +154,7 @@ bool LLFloaterPay::postBuild() { S32 i = 0; - give_money_ptr info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_0)); + give_money_ptr info = std::make_shared(this, PAY_BUTTON_DEFAULT_0); mCallbackData.push_back(info); childSetAction("fastpay 1", boost::bind(LLFloaterPay::onGive, info)); @@ -164,7 +164,7 @@ bool LLFloaterPay::postBuild() mQuickPayInfo[i] = info; ++i; - info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_1)); + info = std::make_shared(this, PAY_BUTTON_DEFAULT_1); mCallbackData.push_back(info); childSetAction("fastpay 5", boost::bind(LLFloaterPay::onGive, info)); @@ -174,7 +174,7 @@ bool LLFloaterPay::postBuild() mQuickPayInfo[i] = info; ++i; - info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_2)); + info = std::make_shared(this, PAY_BUTTON_DEFAULT_2); mCallbackData.push_back(info); childSetAction("fastpay 10", boost::bind(LLFloaterPay::onGive, info)); @@ -184,7 +184,7 @@ bool LLFloaterPay::postBuild() mQuickPayInfo[i] = info; ++i; - info = give_money_ptr(new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_3)); + info = std::make_shared(this, PAY_BUTTON_DEFAULT_3); mCallbackData.push_back(info); childSetAction("fastpay 20", boost::bind(LLFloaterPay::onGive, info)); diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 7311f0deb6..4c3578119e 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -209,8 +209,8 @@ void LLFloaterPermsDefault::updateCapCoro(std::string url) std::string previousReason; LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("updateCapCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD postData = LLSD::emptyMap(); postData["default_object_perm_masks"]["Group"] = diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 99161d8d93..43731dd766 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -410,11 +410,11 @@ void LLFloaterPreference::saveAvatarPropertiesCoro(const std::string cap_url, bo { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("put_avatar_properties_coro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("put_avatar_properties_coro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setFollowRedirects(true); std::string finalUrl = cap_url + "/" + gAgentID.asString(); @@ -3511,7 +3511,7 @@ void LLFloaterPreference::collectSearchableItems() LLTabContainer *pRoot = getChild< LLTabContainer >( "pref core" ); if( mFilterEdit && pRoot ) { - mSearchData.reset(new ll::prefs::SearchData() ); + mSearchData = std::make_unique(); ll::prefs::TabContainerDataPtr pRootTabcontainer = ll::prefs::TabContainerDataPtr( new ll::prefs::TabContainerData ); pRootTabcontainer->mTabContainer = pRoot; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 334f32d051..5a9b529a0c 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -4033,8 +4033,8 @@ void LLPanelEstateAccess::updateLists() void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestEstateGetAccessoCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = std::make_shared("requestEstateGetAccessoCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llfloaterregionrestartschedule.cpp b/indra/newview/llfloaterregionrestartschedule.cpp index 59bcb22dce..cd699efd5b 100644 --- a/indra/newview/llfloaterregionrestartschedule.cpp +++ b/indra/newview/llfloaterregionrestartschedule.cpp @@ -272,9 +272,9 @@ void LLFloaterRegionRestartSchedule::requestRegionShcheduleCoro(std::string url, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("RegionShcheduleRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); @@ -367,9 +367,9 @@ void LLFloaterRegionRestartSchedule::setRegionShcheduleCoro(std::string url, LLS { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RegionShcheduleSetter", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("RegionShcheduleSetter", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index e2c6305f4f..7e7eb91636 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -417,8 +417,8 @@ void LLFloaterReporter::requestAbuseCategoriesCoro(std::string url, LLHandle("requestAbuseCategoriesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); @@ -860,7 +860,7 @@ void LLFloaterReporter::sendReportViaCaps(std::string url, std::string sshot_url if(!sshot_url.empty()) { // try to upload screenshot - LLResourceUploadInfo::ptr_t uploadInfo(new LLARScreenShotUploader(report, mResourceDatap->mAssetInfo.mUuid, mResourceDatap->mAssetInfo.mType)); + LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared(report, mResourceDatap->mAssetInfo.mUuid, mResourceDatap->mAssetInfo.mType); LLViewerAssetUpload::EnqueueInventoryUpload(sshot_url, uploadInfo); } else diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index f789036e5e..58d624a7d0 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -178,8 +178,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro(std::string url { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptResourcesCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("getLandScriptResourcesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD postData; @@ -222,8 +222,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptSummaryCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptSummaryCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("getLandScriptSummaryCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); @@ -274,8 +274,8 @@ void LLPanelScriptLimitsRegionMemory::getLandScriptDetailsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getLandScriptDetailsCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("getLandScriptDetailsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llfloatersimplesnapshot.cpp b/indra/newview/llfloatersimplesnapshot.cpp index c0de8ab811..55b39d9193 100644 --- a/indra/newview/llfloatersimplesnapshot.cpp +++ b/indra/newview/llfloatersimplesnapshot.cpp @@ -54,11 +54,11 @@ void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, L { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("post_profile_image_coro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("post_profile_image_coro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setFollowRedirects(true); LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, first_data, httpOpts, httpHeaders); @@ -87,9 +87,9 @@ void post_thumbnail_image_coro(std::string cap_url, std::string path_to_image, L // Upload the image - LLCore::HttpRequest::ptr_t uploaderhttpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t uploaderhttpHeaders(new LLCore::HttpHeaders); - LLCore::HttpOptions::ptr_t uploaderhttpOpts(new LLCore::HttpOptions); + LLCore::HttpRequest::ptr_t uploaderhttpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t uploaderhttpHeaders = std::make_shared(); + LLCore::HttpOptions::ptr_t uploaderhttpOpts = std::make_shared(); S64 length; { diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 8eec5b753a..da4b509738 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -248,9 +248,9 @@ void LLFloaterTOS::testSiteIsAliveCoro(LLHandle handle, std::string u { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared("testSiteIsAliveCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); httpOpts->setHeadersOnly(true); diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 2f1857ec61..9696c3d3f8 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -201,10 +201,10 @@ void LLFloaterURLEntry::getMediaTypeCoro(std::string url, LLHandle pa { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMediaTypeCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared("getMediaTypeCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setFollowRedirects(true); httpOpts->setHeadersOnly(true); diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 1bbeba43ec..550af7af53 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -71,7 +71,7 @@ LLGestureMgr::LLGestureMgr() mLoadingCount(0) { gInventory.addObserver(this); - mListener.reset(new LLGestureListener()); + mListener = std::make_shared(); } diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 3e4aadc381..ac8477a615 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -723,9 +723,9 @@ void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("modifyMaterialCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("modifyMaterialCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOpts->setFollowRedirects(true); diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index d53b36e59f..e0da762279 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -1975,8 +1975,8 @@ void LLGroupMgr::getGroupBanRequestCoro(std::string url, LLUUID group_id) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("groupMembersRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); std::string finalUrl = url + "?group_id=" + group_id.asString(); @@ -2004,10 +2004,10 @@ void LLGroupMgr::postGroupBanRequestCoro(std::string url, LLUUID group_id, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); - LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions); + httpAdapter = std::make_shared("groupMembersRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOptions = std::make_shared(); httpOptions->setFollowRedirects(false); @@ -2141,9 +2141,9 @@ void LLGroupMgr::groupMembersRequestCoro(std::string url, LLUUID group_id, U32 p << ", sort_column: " << sort_column << ", sort_descending: " << sort_descending << LL_ENDL; LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("groupMembersRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); LLSD postData = LLSD::emptyMap(); postData["group_id"] = group_id; diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 7cd0171a37..fe567ac7ec 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -1551,8 +1551,8 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("requestOfflineMessagesCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("requestOfflineMessagesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); 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"; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e322d3ae28..848f28f933 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3316,7 +3316,7 @@ bool move_inv_category_world_to_agent(const LLUUID& object_id, if (drop && accept) { - std::shared_ptr move_inv(new LLMoveInv); + std::shared_ptr move_inv = std::make_shared(); move_inv->mObjectID = object_id; move_inv->mCategoryID = category_id; move_inv->mCallback = callback; @@ -5989,7 +5989,7 @@ bool LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if (accept && drop) { LLUUID item_id = inv_item->getUUID(); - std::shared_ptr move_inv (new LLMoveInv()); + std::shared_ptr move_inv = std::make_shared(); move_inv->mObjectID = inv_item->getParentUUID(); two_uuids_t item_pair(mUUID, item_id); move_inv->mMoveList.push_back(item_pair); diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index c54af7d9f1..97c80cc01d 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -3582,7 +3582,7 @@ bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop, if (accept && drop) { - std::shared_ptr move_inv (new LLMoveInv()); + std::shared_ptr move_inv = std::make_shared(); move_inv->mObjectID = inv_item->getParentUUID(); std::pair item_pair(folder_id, inv_item->getUUID()); move_inv->mMoveList.push_back(item_pair); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 2dfc3b014f..8de0a3c648 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1107,9 +1107,9 @@ void LLInventoryModel::createNewCategoryCoro(std::string url, LLSD postData, inv { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("createNewCategoryCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("createNewCategoryCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); @@ -3257,11 +3257,11 @@ void LLInventoryModel::initHttpRequest() mHttpRequestFG = new LLCore::HttpRequest; mHttpRequestBG = new LLCore::HttpRequest; - mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + mHttpOptions = std::make_shared(); mHttpOptions->setTransferTimeout(300); mHttpOptions->setUseRetryAfter(true); // mHttpOptions->setTrace(2); // Do tracing of requests - mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + mHttpHeaders = std::make_shared(); mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML); mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_LLSD_XML); mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_INVENTORY); 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; } diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index ac22be9d5a..a50d6b579e 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -249,7 +249,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd) if (!url.empty()) { body[i]["agent_id"] = gAgent.getID(); - LLCore::HttpHandler::ptr_t handler(new LLInventoryModel::FetchItemHttpHandler(body[i])); + LLCore::HttpHandler::ptr_t handler = std::make_shared(body[i]); gInventory.requestPost(true, url, body[i], handler, (i ? "Library Item" : "Inventory Item")); continue; } diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 41cec4f074..e9d68723d3 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -80,7 +80,7 @@ std::string construct_start_string(); LLLoginInstance::LLLoginInstance() : - mLoginModule(new LLLogin()), + mLoginModule(std::make_unique()), mNotifications(NULL), mLoginState("offline"), mSaveMFA(true), diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 7b8211ded8..ac2f52a262 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -206,10 +206,10 @@ namespace LLMarketplaceImport { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("marketplacePostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("marketplacePostCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(true); @@ -267,17 +267,17 @@ namespace LLMarketplaceImport { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("marketplaceGetCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("marketplaceGetCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); httpOpts->setFollowRedirects(!sMarketplaceCookie.empty()); if (buildHeaders) { - httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + httpHeaders = std::make_shared(); httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, "*/*"); httpHeaders->append(HTTP_OUT_HEADER_COOKIE, sMarketplaceCookie); @@ -783,9 +783,9 @@ void LLMarketplaceData::getMerchantStatusCoro() { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("getMerchantStatusCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setFollowRedirects(true); @@ -861,9 +861,9 @@ void LLMarketplaceData::getSLMListingsCoro(LLUUID folderId) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("getSLMListingsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -926,9 +926,9 @@ void LLMarketplaceData::getSingleListingCoro(S32 listingId, LLUUID folderId) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("getSingleListingCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -997,9 +997,9 @@ void LLMarketplaceData::createSLMListingCoro(LLUUID folderId, LLUUID versionId, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("createSLMListingCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -1071,9 +1071,9 @@ void LLMarketplaceData::updateSLMListingCoro(LLUUID folderId, S32 listingId, LLU { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("updateSLMListingCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -1166,9 +1166,9 @@ void LLMarketplaceData::associateSLMListingCoro(LLUUID folderId, S32 listingId, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("associateSLMListingCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); @@ -1247,9 +1247,9 @@ void LLMarketplaceData::deleteSLMListingCoro(S32 listingId) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("deleteSLMListingCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); httpHeaders->append("Accept", "application/json"); httpHeaders->append("Content-Type", "application/json"); diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index ee5e5b438e..c80d2a55ab 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -137,9 +137,9 @@ LLMaterialMgr::LLMaterialMgr(): { LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp()); - mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest()); - mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()); - mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()); + mHttpRequest = std::make_shared(); + mHttpHeaders = std::make_shared(); + mHttpOptions = std::make_shared(); mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_MATERIALS); mMaterials.insert(std::pair(LLMaterialID::null, LLMaterialPtr(NULL))); @@ -684,9 +684,9 @@ void LLMaterialMgr::processGetQueue() LLSD postData = LLSD::emptyMap(); postData[MATERIALS_CAP_ZIP_FIELD] = materialBinary; - LLCore::HttpHandler::ptr_t handler(new LLMaterialHttpHandler("POST", + LLCore::HttpHandler::ptr_t handler = std::make_shared("POST", boost::bind(&LLMaterialMgr::onGetResponse, this, _1, _2, region_id) - )); + ); LL_DEBUGS("Materials") << "POSTing to region '" << regionp->getName() << "' at '" << capURL << " for " << materialsData.size() << " materials." << "\ndata: " << ll_pretty_print_sd(materialsData) << LL_ENDL; @@ -864,9 +864,9 @@ void LLMaterialMgr::processGetAllQueueCoro(LLUUID regionId) LL_DEBUGS("Materials") << "GET all for region " << regionId << "url " << capURL << LL_ENDL; - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("processGetAllQueue", LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest()); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t + httpAdapter = std::make_shared("processGetAllQueue", LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, capURL); @@ -973,9 +973,9 @@ void LLMaterialMgr::processPutQueue() LL_DEBUGS("Materials") << "put for " << itRequest->second.size() << " faces to region " << itRequest->first->getName() << LL_ENDL; - LLCore::HttpHandler::ptr_t handler (new LLMaterialHttpHandler("PUT", + LLCore::HttpHandler::ptr_t handler = std::make_shared("PUT", boost::bind(&LLMaterialMgr::onPutResponse, this, _1, _2) - )); + ); LLCore::HttpHandle handle = LLCoreHttpUtil::requestPutWithLLSD( mHttpRequest, mHttpPolicy, capURL, diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index 83a6e66019..50236587ac 100644 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -172,9 +172,9 @@ LLMediaDataClient::LLMediaDataClient(F32 queue_timer_delay, F32 retry_timer_dela mMaxSortedQueueSize(max_sorted_queue_size), mMaxRoundRobinQueueSize(max_round_robin_queue_size), mQueueTimerIsRunning(false), - mHttpRequest(new LLCore::HttpRequest()), - mHttpHeaders(new LLCore::HttpHeaders()), - mHttpOpts(new LLCore::HttpOptions()), + mHttpRequest(std::make_shared()), + mHttpHeaders(std::make_shared()), + mHttpOpts(std::make_shared()), mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID) { // *TODO: Look up real Policy ID @@ -660,7 +660,7 @@ void LLMediaDataClient::Handler::onFailure(LLCore::HttpResponse * response, LLCo void LLObjectMediaDataClient::fetchMedia(LLMediaDataClientObject *object) { // Create a get request and put it in the queue. - enqueue(Request::ptr_t(new RequestGet(object, this))); + enqueue(std::make_shared(object, this)); } const char *LLObjectMediaDataClient::getCapabilityName() const @@ -880,14 +880,14 @@ LLSD LLObjectMediaDataClient::RequestGet::getPayload() const LLCore::HttpHandler::ptr_t LLObjectMediaDataClient::RequestGet::createHandler() { - return LLCore::HttpHandler::ptr_t(new LLObjectMediaDataClient::Handler(shared_from_this())); + return std::make_shared(shared_from_this()); } void LLObjectMediaDataClient::updateMedia(LLMediaDataClientObject *object) { // Create an update request and put it in the queue. - enqueue(Request::ptr_t(new RequestUpdate(object, this))); + enqueue(std::make_shared(object, this)); } LLObjectMediaDataClient::RequestUpdate::RequestUpdate(LLMediaDataClientObject *obj, LLMediaDataClient *mdc): @@ -917,7 +917,7 @@ LLSD LLObjectMediaDataClient::RequestUpdate::getPayload() const LLCore::HttpHandler::ptr_t LLObjectMediaDataClient::RequestUpdate::createHandler() { // This just uses the base class's responder. - return LLCore::HttpHandler::ptr_t(new LLMediaDataClient::Handler(shared_from_this())); + return std::make_shared(shared_from_this()); } void LLObjectMediaDataClient::Handler::onSuccess(LLCore::HttpResponse * response, const LLSD &content) @@ -1037,7 +1037,7 @@ void LLObjectMediaNavigateClient::navigate(LLMediaDataClientObject *object, U8 t // LL_INFOS("LLMediaDataClient") << "navigate() initiated: " << ll_print_sd(sd_payload) << LL_ENDL; // Create a get request and put it in the queue. - enqueue(Request::ptr_t(new RequestNavigate(object, this, texture_index, url))); + enqueue(std::make_shared(object, this, texture_index, url)); } LLObjectMediaNavigateClient::RequestNavigate::RequestNavigate(LLMediaDataClientObject *obj, LLMediaDataClient *mdc, U8 texture_index, const std::string &url): @@ -1058,7 +1058,7 @@ LLSD LLObjectMediaNavigateClient::RequestNavigate::getPayload() const LLCore::HttpHandler::ptr_t LLObjectMediaNavigateClient::RequestNavigate::createHandler() { - return LLCore::HttpHandler::ptr_t(new LLObjectMediaNavigateClient::Handler(shared_from_this())); + return std::make_shared(shared_from_this()); } void LLObjectMediaNavigateClient::Handler::onSuccess(LLCore::HttpResponse * response, const LLSD &content) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 413f02b723..c2ef8e5abc 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -943,20 +943,20 @@ LLMeshRepoThread::LLMeshRepoThread() mSkinMapMutex = new LLMutex(); mSignal = new LLCondition(); mHttpRequest = new LLCore::HttpRequest; - mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + mHttpOptions = std::make_shared(); mHttpOptions->setTransferTimeout(SMALL_MESH_XFER_TIMEOUT); mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter")); - mHttpLargeOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + mHttpLargeOptions = std::make_shared(); mHttpLargeOptions->setTransferTimeout(LARGE_MESH_XFER_TIMEOUT); mHttpLargeOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter")); - mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + mHttpHeaders = std::make_shared(); mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_VND_LL_MESH); mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_MESH2); mHttpLargePolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_LARGE_MESH); // Lod processing is expensive due to the number of requests // and a need to do expensive cacheOptimize(). - mMeshThreadPool.reset(new LL::ThreadPool("MeshLodProcessing", 2)); + mMeshThreadPool = std::make_unique("MeshLodProcessing", 2); mMeshThreadPool->start(); } @@ -1653,7 +1653,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id) if (!http_url.empty()) { - LLMeshHandlerBase::ptr_t handler(new LLMeshSkinInfoHandler(mesh_id, offset, size)); + LLMeshHandlerBase::ptr_t handler = std::make_shared(mesh_id, offset, size); LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler); if (LLCORE_HTTP_HANDLE_INVALID == handle) { @@ -1761,7 +1761,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id) if (!http_url.empty()) { - LLMeshHandlerBase::ptr_t handler(new LLMeshDecompositionHandler(mesh_id, offset, size)); + LLMeshHandlerBase::ptr_t handler = std::make_shared(mesh_id, offset, size); LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler); if (LLCORE_HTTP_HANDLE_INVALID == handle) { @@ -1860,7 +1860,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id) if (!http_url.empty()) { - LLMeshHandlerBase::ptr_t handler(new LLMeshPhysicsShapeHandler(mesh_id, offset, size)); + LLMeshHandlerBase::ptr_t handler = std::make_shared(mesh_id, offset, size); LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler); if (LLCORE_HTTP_HANDLE_INVALID == handle) { @@ -1988,7 +1988,7 @@ bool LLMeshRepoThread::fetchMeshHeader(const LLVolumeParams& mesh_params) //within the first 4KB //NOTE -- this will break of headers ever exceed 4KB - LLMeshHandlerBase::ptr_t handler(new LLMeshHeaderHandler(mesh_params, 0, MESH_HEADER_SIZE)); + LLMeshHandlerBase::ptr_t handler = std::make_shared(mesh_params, 0, MESH_HEADER_SIZE); LLCore::HttpHandle handle = getByteRange(http_url, 0, MESH_HEADER_SIZE, handler); if (LLCORE_HTTP_HANDLE_INVALID == handle) { @@ -2164,7 +2164,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod) { LL_DEBUGS(LOG_MESH) << "Mesh/Cache: Mesh body for ID " << mesh_id << " - was retrieved from the simulator." << LL_ENDL; - LLMeshHandlerBase::ptr_t handler(new LLMeshLODHandler(mesh_params, lod, offset, size)); + LLMeshHandlerBase::ptr_t handler = std::make_shared(mesh_params, lod, offset, size); LLCore::HttpHandle handle = getByteRange(http_url, offset, size, handler); if (LLCORE_HTTP_HANDLE_INVALID == handle) { @@ -2611,11 +2611,11 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list_t& data mMeshUploadTimeOut = gSavedSettings.getS32("MeshUploadTimeOut"); mHttpRequest = new LLCore::HttpRequest; - mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + mHttpOptions = std::make_shared(); mHttpOptions->setTransferTimeout(mMeshUploadTimeOut); mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter")); mHttpOptions->setRetries(UPLOAD_RETRY_LIMIT); - mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + mHttpHeaders = std::make_shared(); mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML); mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_UPLOADS); } @@ -4321,7 +4321,7 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para else { //first request for this mesh - std::shared_ptr request(new PendingRequestLOD(mesh_params, new_lod)); + std::shared_ptr request = std::make_shared(mesh_params, new_lod); mPendingRequests.emplace_back(request); mLoadingMeshes[new_lod][mesh_id].initData(vobj, request); LLMeshRepository::sLODPending++; @@ -4819,7 +4819,7 @@ const LLMeshSkinInfo* LLMeshRepository::getSkinInfo(const LLUUID& mesh_id, LLVOV else { //first request for this mesh - std::shared_ptr request(new PendingRequestUUID(mesh_id, MESH_REQUEST_SKIN)); + std::shared_ptr request = std::make_shared(mesh_id, MESH_REQUEST_SKIN); mLoadingSkins[mesh_id].initData(requesting_obj, request); mPendingRequests.emplace_back(request); } diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index 505f276f8c..29f11f7ca6 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -60,7 +60,7 @@ void LLNotificationManager::init() mChannels.emplace_back(new LLBrowserNotification()); mChannels.emplace_back(new LLIMHandler()); - mChatHandler = std::shared_ptr(new LLFloaterIMNearbyChatHandler()); + mChatHandler = std::make_shared(); } //-------------------------------------------------------------------------- diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 0e72771bd8..35624436b3 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -126,11 +126,11 @@ static void put_avatar_properties_coro(std::string cap_url, LLUUID agent_id, LLS { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("put_avatar_properties_coro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("put_avatar_properties_coro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setFollowRedirects(true); std::string finalUrl = cap_url + "/" + agent_id.asString(); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index ed80c8b732..fe9145bf71 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -183,7 +183,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, : LLPanel(), mCallback(callback), mCallbackData(cb_data), - mListener(new LLPanelLoginListener(this)), + mListener(std::make_unique(this)), mFirstLoginThisInstall(gSavedSettings.getBOOL("FirstLoginThisInstall")), mUsernameLength(0), mPasswordLength(0), diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index fe172c8726..34d2d4d6a5 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -106,11 +106,11 @@ LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::stri { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("post_profile_image_coro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("post_profile_image_coro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setFollowRedirects(true); LLSD result = httpAdapter->postAndSuspend(httpRequest, cap_url, first_data, httpOpts, httpHeaders); @@ -138,9 +138,9 @@ LLUUID post_profile_image(std::string cap_url, const LLSD &first_data, std::stri } // Upload the image - LLCore::HttpRequest::ptr_t uploaderhttpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t uploaderhttpHeaders(new LLCore::HttpHeaders); - LLCore::HttpOptions::ptr_t uploaderhttpOpts(new LLCore::HttpOptions); + LLCore::HttpRequest::ptr_t uploaderhttpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t uploaderhttpHeaders = std::make_shared(); + LLCore::HttpOptions::ptr_t uploaderhttpOpts = std::make_shared(); S64 length; { diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 3aedde74c6..4fcce50df1 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -466,8 +466,8 @@ void LLPanelWearing::getAttachmentLimitsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getAttachmentLimitsCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("getAttachmentLimitsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 1366ba6c6f..8e03492381 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -65,7 +65,7 @@ void LLPathfindingCharacterList::parseCharacterListData(const LLSD& pCharacterLi continue; const std::string& uuid(characterDataIter->first); const LLSD& characterData = characterDataIter->second; - LLPathfindingObjectPtr character(new LLPathfindingCharacter(uuid, characterData)); + LLPathfindingObjectPtr character = std::make_shared(uuid, characterData); objectMap.insert(std::pair(uuid, character)); } } diff --git a/indra/newview/llpathfindinglinksetlist.cpp b/indra/newview/llpathfindinglinksetlist.cpp index 2012d7a094..81efb0a6fc 100644 --- a/indra/newview/llpathfindinglinksetlist.cpp +++ b/indra/newview/llpathfindinglinksetlist.cpp @@ -206,7 +206,7 @@ void LLPathfindingLinksetList::parseLinksetListData(const LLSD& pLinksetListData const LLSD& linksetData = linksetDataIter->second; if(linksetData.size() != 0) { - LLPathfindingObjectPtr linksetPtr(new LLPathfindingLinkset(uuid, linksetData)); + LLPathfindingObjectPtr linksetPtr = std::make_shared(uuid, linksetData); objectMap.insert(std::pair(uuid, linksetPtr)); } } 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); diff --git a/indra/newview/llpbrterrainfeatures.cpp b/indra/newview/llpbrterrainfeatures.cpp index bb771c6963..d652e23dd5 100644 --- a/indra/newview/llpbrterrainfeatures.cpp +++ b/indra/newview/llpbrterrainfeatures.cpp @@ -86,9 +86,9 @@ void LLPBRTerrainFeatures::queryRegionCoro(std::string cap_url, LLUUID region_id { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("queryRegionCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("queryRegionCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOpts->setFollowRedirects(true); @@ -159,9 +159,9 @@ void LLPBRTerrainFeatures::modifyRegionCoro(std::string cap_url, LLSD updates, v { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("modifyRegionCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("modifyRegionCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; httpOpts->setFollowRedirects(true); diff --git a/indra/newview/llpersistentnotificationstorage.cpp b/indra/newview/llpersistentnotificationstorage.cpp index e06d025f59..1cc311e1b5 100644 --- a/indra/newview/llpersistentnotificationstorage.cpp +++ b/indra/newview/llpersistentnotificationstorage.cpp @@ -141,7 +141,7 @@ void LLPersistentNotificationStorage::loadNotifications() ++notification_it) { LLSD notification_params = *notification_it; - LLNotificationPtr notification(new LLNotification(notification_params)); + LLNotificationPtr notification = std::make_shared(notification_params); LLNotificationResponderPtr responder(createResponder(notification_params["name"], notification_params["responder"])); notification->setResponseFunctor(responder); diff --git a/indra/newview/llproductinforequest.cpp b/indra/newview/llproductinforequest.cpp index 728cb22431..d962622dfd 100644 --- a/indra/newview/llproductinforequest.cpp +++ b/indra/newview/llproductinforequest.cpp @@ -70,8 +70,8 @@ void LLProductInfoRequestManager::getLandDescriptionsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("getLandDescriptionsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp index d0aa1af2f3..f89afd38ab 100644 --- a/indra/newview/llremoteparcelrequest.cpp +++ b/indra/newview/llremoteparcelrequest.cpp @@ -201,8 +201,8 @@ void LLRemoteParcelInfoProcessor::regionParcelInfoCoro(std::string url, { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("RemoteParcelRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("RemoteParcelRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD bodyData; diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 9b6a87e68d..e696c2dcb5 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -1064,11 +1064,11 @@ void LLSnapshotLivePreview::saveTexture(bool outfit_snapshot, std::string name) LLFolderType::EType folder_type = outfit_snapshot ? LLFolderType::FT_NONE : LLFolderType::FT_SNAPSHOT_CATEGORY; LLInventoryType::EType inv_type = outfit_snapshot ? LLInventoryType::IT_NONE : LLInventoryType::IT_SNAPSHOT; - LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared( tid, LLAssetType::AT_TEXTURE, res_name, res_desc, 0, folder_type, inv_type, PERM_ALL, LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), - expected_upload_cost, LLUUID::null, !outfit_snapshot)); + expected_upload_cost, LLUUID::null, !outfit_snapshot); upload_new_resource(assetUploadInfo); diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index dc0d834458..f079c70c6c 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -867,9 +867,9 @@ void LLIMSpeakerMgr::moderationActionCoro(std::string url, LLSD action) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("moderationActionCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared("moderationActionCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index a9ea741c89..59d97943e3 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2586,9 +2586,9 @@ void release_notes_coro(const std::string url) LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("releaseNotesCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared("releaseNotesCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setHeadersOnly(true); // only making sure it isn't 404 or something like that diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 08adb34c3e..44bada13c2 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -715,7 +715,7 @@ void collectChildren( LLMenuGL *aMenu, ll::statusbar::SearchableItemPtr aParentM { LLMenuItemGL *pMenu = aMenu->getItem( i ); - ll::statusbar::SearchableItemPtr pItem( new ll::statusbar::SearchableItem ); + ll::statusbar::SearchableItemPtr pItem = std::make_shared(); pItem->mCtrl = pMenu; pItem->mMenu = pMenu; pItem->mLabel = utf8str_to_wstring( pMenu->ll::ui::SearchableControl::getSearchText() ); @@ -731,8 +731,8 @@ void collectChildren( LLMenuGL *aMenu, ll::statusbar::SearchableItemPtr aParentM void LLStatusBar::collectSearchableItems() { - mSearchData.reset( new ll::statusbar::SearchData ); - ll::statusbar::SearchableItemPtr pItem( new ll::statusbar::SearchableItem ); + mSearchData = std::make_unique(); + ll::statusbar::SearchableItemPtr pItem = std::make_shared(); mSearchData->mRootMenu = pItem; collectChildren( gMenuBarView, pItem ); } diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 5114ee3672..f89ae00c5b 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -120,8 +120,8 @@ void LLSyntaxIdLSL::fetchKeywordsFileCoro(std::string url, std::string fileSpec) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("fetchKeywordsFileCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); std::pair::iterator, bool> insrt = mInflightFetches.insert(fileSpec); if (!insrt.second) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index f7cb0ee7ed..631dd1bed4 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2462,13 +2462,13 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mod LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp()); mHttpRequest = new LLCore::HttpRequest; - mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); - mHttpOptionsWithHeaders = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + mHttpOptions = std::make_shared(); + mHttpOptionsWithHeaders = std::make_shared(); mHttpOptionsWithHeaders->setWantHeaders(true); - mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + mHttpHeaders = std::make_shared(); mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_IMAGE_X_J2C); mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_TEXTURE); - mHttpMetricsHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders); + mHttpMetricsHeaders = std::make_shared(); mHttpMetricsHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML); mHttpMetricsPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_REPORTING); mHttpHighWater = HTTP_NONPIPE_REQUESTS_HIGH_WATER; @@ -3572,7 +3572,7 @@ TFReqSendMetrics::TFReqSendMetrics(const std::string & caps_url, mSessionID(session_id), mAgentID(agent_id), mStatsSD(stats_sd), - mHandler(new AssetReportHandler) + mHandler(std::make_shared()) {} diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 0f871dc1bb..b05c9fde59 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -117,7 +117,7 @@ LLToast::LLToast(const LLToast::Params& p) mIsFading(false), mIsHovered(false) { - mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs)); + mTimer = std::make_unique(this, p.lifetime_secs); buildFromFile("panel_toast.xml"); diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 72e30bd765..bc656feaba 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -155,10 +155,10 @@ void LLTranslationAPIHandler::verifyKeyCoro(LLTranslate::EService service, LLSD { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("getMerchantStatusCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); std::string user_agent = stringize( @@ -210,10 +210,10 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getMerchantStatusCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("getMerchantStatusCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); std::string user_agent = stringize( diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index 255cfc998a..6b2f53c272 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -502,9 +502,9 @@ void LLViewerAssetStorage::assetRequestCoro( LLCore::HttpRequest::policy_t httpPolicy(LLAppCoreHttp::AP_TEXTURE); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("assetRequestCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared("assetRequestCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts); diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 5298bd1cfa..65a69acc88 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -864,8 +864,8 @@ LLUUID LLViewerAssetUpload::EnqueueInventoryUpload(const std::string &url, const void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, const LLUUID &id, std::string url, LLResourceUploadInfo::ptr_t uploadInfo) { - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOptions = std::make_shared(); httpOptions->setTimeout(LL_ASSET_UPLOAD_TIMEOUT_SEC); LLSD result = uploadInfo->prepareUpload(); diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp index 243d4dec0e..c174c495ec 100644 --- a/indra/newview/llviewerdisplayname.cpp +++ b/indra/newview/llviewerdisplayname.cpp @@ -104,9 +104,9 @@ void LLViewerDisplayName::setDisplayNameCoro(const std::string& cap_url, const L { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("SetDisplayNameCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("SetDisplayNameCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); // People API can return localized error messages. Indicate our // language preference via header. diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index ec5381ddfc..6e9458597a 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -491,7 +491,7 @@ void LLViewerInventoryItem::fetchFromServer(void) const body["items"][0]["owner_id"] = mPermissions.getOwner(); body["items"][0]["item_id"] = mUUID; - LLCore::HttpHandler::ptr_t handler(new LLInventoryModel::FetchItemHttpHandler(body)); + LLCore::HttpHandler::ptr_t handler = std::make_shared(body); gInventory.requestPost(true, url, body, handler, "Inventory Item"); } } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 89861d74bc..d5f63674e9 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1191,7 +1191,7 @@ bool LLViewerMedia::parseRawCookie(const std::string raw_cookie, std::string& na ///////////////////////////////////////////////////////////////////////////////////////// LLCore::HttpHeaders::ptr_t LLViewerMedia::getHttpHeaders() { - LLCore::HttpHeaders::ptr_t headers(new LLCore::HttpHeaders); + LLCore::HttpHeaders::ptr_t headers = std::make_shared(); headers->append(HTTP_OUT_HEADER_ACCEPT, "*/*"); headers->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_XML); @@ -1219,10 +1219,10 @@ void LLViewerMedia::getOpenIDCookieCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getOpenIDCookieCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("getOpenIDCookieCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); httpOpts->setFollowRedirects(true); httpOpts->setWantHeaders(true); @@ -1357,10 +1357,10 @@ void LLViewerMedia::openIDSetupCoro(std::string openidUrl, std::string openidTok { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("openIDSetupCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("openIDSetupCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); httpOpts->setWantHeaders(true); @@ -2631,10 +2631,10 @@ void LLViewerMediaImpl::mimeDiscoveryCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("mimeDiscoveryCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + httpAdapter = std::make_shared("mimeDiscoveryCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); // Increment our refcount so that we do not go away while the coroutine is active. this->ref(); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index fcffde3caf..772abb0373 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -642,7 +642,7 @@ void do_bulk_upload(std::vector filenames, bool allow_2k, const LLU LLFileSystem fmt_file(new_asset_id, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE); fmt_file.write(formatted->getData(), formatted->getDataSize()); - LLResourceUploadInfo::ptr_t assetUploadInfo(new LLResourceUploadInfo( + LLResourceUploadInfo::ptr_t assetUploadInfo = std::make_shared( tid, LLAssetType::AT_TEXTURE, asset_name, asset_name, 0, @@ -652,14 +652,14 @@ void do_bulk_upload(std::vector filenames, bool allow_2k, const LLU LLFloaterPerms::getEveryonePerms("Uploads"), LLAgentBenefitsMgr::current().getTextureUploadCost(raw_image->getWidth(), raw_image->getHeight()), dest - )); + ); upload_new_resource(assetUploadInfo); } } else { - LLNewFileResourceUploadInfo* info_p = new LLNewFileResourceUploadInfo( + LLResourceUploadInfo::ptr_t uploadInfo = std::make_shared( filename, asset_name, asset_name, 0, @@ -669,7 +669,6 @@ void do_bulk_upload(std::vector filenames, bool allow_2k, const LLU LLFloaterPerms::getEveryonePerms("Uploads"), expected_upload_cost, dest); - LLResourceUploadInfo::ptr_t uploadInfo(info_p); upload_new_resource(uploadInfo); } 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); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 59bcad9a26..1675c44c5c 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2988,8 +2988,8 @@ void LLViewerObject::fetchInventoryFromCapCoro(const LLUUID task_inv) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TaskInventoryRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("TaskInventoryRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); std::string url = obj->mRegionp->getCapability("RequestTaskInventory") + "?task_id=" + obj->mID.asString(); // If we already have a copy of the inventory then add it so the server won't re-send something we already have. // We expect this case to crop up in the case of failed inventory mutations, but it might happen otherwise as well. diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index fb9e5fd0a9..1b38fed3bb 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1055,8 +1055,8 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("fetchObjectCostsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); @@ -1179,8 +1179,8 @@ void LLViewerObjectList::fetchPhisicsFlagsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("fetchPhisicsFlagsCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD idList; U32 objectIndex = 0; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index a085bc4d91..cd70f8f9b9 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -252,8 +252,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("BaseCapabilitiesRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result; LLViewerRegion *regionp = NULL; @@ -406,8 +406,8 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("BaseCapabilitiesRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result; LLViewerRegion *regionp = NULL; @@ -540,8 +540,8 @@ void LLViewerRegionImpl::requestSimulatorFeatureCoro(std::string url, U64 region { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("BaseCapabilitiesRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("requestSimulatorFeatureCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLViewerRegion *regionp = NULL; S32 attemptNumber = 0; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 74b34ceee6..cb7d45564d 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1884,8 +1884,8 @@ LLViewerWindow::LLViewerWindow(const Params& p) // pass its value right now. Instead, pass it a nullary function that // will, when we later need it, return the value of gKeyboard. // boost::lambda::var() constructs such a functor on the fly. - mWindowListener.reset(new LLWindowListener(this, boost::lambda::var(gKeyboard))); - mViewerWindowListener.reset(new LLViewerWindowListener(this)); + mWindowListener = std::make_unique(this, boost::lambda::var(gKeyboard)); + mViewerWindowListener = std::make_unique(this); mSystemChannel.reset(new LLNotificationChannel("System", "Visible", LLNotificationFilters::includeEverything)); mCommunicationChannel.reset(new LLCommunicationChannel("Communication", "Visible")); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 653c7e82eb..1e62f47082 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -2211,9 +2211,9 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("appearanceChangeMetrics", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared("appearanceChangeMetrics", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); S32 currentSequence = mMetricSequence; if (S32_MAX == ++mMetricSequence) diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index fbe896ac27..b941d356a1 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -610,8 +610,8 @@ void LLVoiceChannelGroup::voiceCallCapCoro(std::string url) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceCallCapCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("voiceCallCapCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD postData; postData["method"] = "call"; diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 8792ae3285..d132cbfa36 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -1164,9 +1164,9 @@ bool LLVivoxVoiceClient::provisionVoiceAccount() LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("voiceAccountProvision", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions); + httpAdapter = std::make_shared("voiceAccountProvision", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); int retryCount(0); LLSD result; @@ -1576,8 +1576,8 @@ bool LLVivoxVoiceClient::requestParcelVoiceInfo() LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("parcelVoiceInfoRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("parcelVoiceInfoRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->postAndSuspend(httpRequest, url, LLSD()); @@ -4620,7 +4620,7 @@ LLVivoxVoiceClient::participantStatePtr_t LLVivoxVoiceClient::sessionState::addP if(!result) { // participant isn't already in one list or the other. - result.reset(new participantState(useAlternateURI?mSIPURI:uri)); + result = std::make_shared(useAlternateURI?mSIPURI:uri); mParticipantsByURI.insert(participantMap::value_type(result->mURI, result)); mParticipantsChanged = true; diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 32f2139679..3efcd763e3 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -1309,7 +1309,7 @@ LLWebRTCVoiceClient::participantStatePtr_t LLWebRTCVoiceClient::sessionState::ad if (!result) { // participant isn't already in one list or the other. - result.reset(new participantState(agent_id, region)); + result = std::make_shared(agent_id, region); mParticipantsByUUID.insert(participantUUIDMap::value_type(agent_id, result)); result->mAvatarID = agent_id; } @@ -2173,7 +2173,7 @@ bool LLWebRTCVoiceClient::estateSessionState::processConnectionStates() // Only connect if the region supports WebRTC voice server type if (isRegionWebRTCEnabled(neighbor)) { - connectionPtr_t connection(new LLVoiceWebRTCSpatialConnection(neighbor, INVALID_PARCEL_ID, mChannelID)); + connectionPtr_t connection = std::make_shared(neighbor, INVALID_PARCEL_ID, mChannelID); mWebRTCConnections.push_back(connection); connection->setMuteMic(mMuted); // mute will be set for primary connection when that connection comes up @@ -2450,11 +2450,11 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection) body["viewer_session"] = connection->mViewerSession; body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE; - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::processIceUpdatesCoro", - LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = + std::make_shared("LLVoiceWebRTCAdHocConnection::processIceUpdatesCoro", + LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); @@ -2664,11 +2664,11 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro(connectionPtr_t connectio body["viewer_session"] = connection->mViewerSession; body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE; - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::breakVoiceConnection", - LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = + std::make_shared("LLVoiceWebRTCAdHocConnection::breakVoiceConnection", + LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); @@ -2733,11 +2733,11 @@ void LLVoiceWebRTCSpatialConnection::requestVoiceConnection() } body["channel_type"] = "local"; body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE; - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::requestVoiceConnection", - LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = + std::make_shared("LLVoiceWebRTCAdHocConnection::requestVoiceConnection", + LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts); @@ -3343,11 +3343,11 @@ void LLVoiceWebRTCAdHocConnection::requestVoiceConnection() body["channel_type"] = "multiagent"; body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE; - LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter( - new LLCoreHttpUtil::HttpCoroutineAdapter("LLVoiceWebRTCAdHocConnection::requestVoiceConnection", - LLCore::HttpRequest::DEFAULT_POLICY_ID)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter = + std::make_shared("LLVoiceWebRTCAdHocConnection::requestVoiceConnection", + LLCore::HttpRequest::DEFAULT_POLICY_ID); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); httpOpts->setWantHeaders(true); diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index 4528ad012d..132cbf4fcd 100644 --- a/indra/newview/llwebprofile.cpp +++ b/indra/newview/llwebprofile.cpp @@ -83,7 +83,7 @@ void LLWebProfile::setAuthCookie(const std::string& cookie) /*static*/ LLCore::HttpHeaders::ptr_t LLWebProfile::buildDefaultHeaders() { - LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders); + LLCore::HttpHeaders::ptr_t httpHeaders = std::make_shared(); LLSD headers = LLViewerMedia::getInstance()->getHeaders(); for (LLSD::map_iterator it = headers.beginMap(); it != headers.endMap(); ++it) @@ -100,9 +100,9 @@ void LLWebProfile::uploadImageCoro(LLPointer image, std::strin { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); - LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions); + httpAdapter = std::make_shared("uploadImageCoro", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); + LLCore::HttpOptions::ptr_t httpOpts = std::make_shared(); LLCore::HttpHeaders::ptr_t httpHeaders; if (dynamic_cast(image.get()) == 0) diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp index ebcdd537a5..1b2953fea6 100644 --- a/indra/newview/llwindowlistener.cpp +++ b/indra/newview/llwindowlistener.cpp @@ -465,7 +465,7 @@ static void mouseEvent(const MouseFunc& func, const LLSD& request) // to the target LLView*. But put it on the heap since "path" is // optional. Nonetheless, manage it with a boost::scoped_ptr so it // will be destroyed when we leave. - tempfunc.reset(new LLView::TemporaryDrilldownFunc(llview::TargetEvent(target))); + tempfunc = std::make_unique(llview::TargetEvent(target)); } // The question of whether the requested LLView actually handled the diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index 4e3a7a8788..aabcb2e514 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -101,8 +101,8 @@ void LLEnvironmentRequest::environmentRequestCoro(std::string url, LLEnvironment LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); S32 requestId = ++LLEnvironmentRequest::sLastRequest; LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EnvironmentRequest", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("EnvironmentRequest", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->getAndSuspend(httpRequest, url); @@ -193,8 +193,8 @@ void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content, LLE { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t - httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("EnvironmentApply", httpPolicy)); - LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest); + httpAdapter = std::make_shared("EnvironmentApply", httpPolicy); + LLCore::HttpRequest::ptr_t httpRequest = std::make_shared(); LLSD result = httpAdapter->postAndSuspend(httpRequest, url, content); diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp index 92e6c88752..758615a730 100644 --- a/indra/newview/llxmlrpclistener.cpp +++ b/indra/newview/llxmlrpclistener.cpp @@ -241,7 +241,7 @@ public: } LLSD http_params = command.get("http_params"); - mTransaction.reset(new LLXMLRPCTransaction(mUri, mMethod, request_params, http_params)); + mTransaction = std::make_unique(mUri, mMethod, request_params, http_params); mPreviousStatus = mTransaction->status(NULL); // Now ensure that we get regular callbacks to poll for completion. diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 7fbcb5fc04..7b0bf6f251 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -50,13 +50,6 @@ #include "llappviewer.h" #include "lltrans.h" -#include "boost/move/unique_ptr.hpp" - -namespace boost -{ - using ::boost::movelib::unique_ptr; // move unique_ptr into the boost namespace. -} - // Static instance of LLXMLRPCListener declared here so that every time we // bring in this code, we instantiate a listener. If we put the static // instance of LLXMLRPCListener into llxmlrpclistener.cpp, the linker would @@ -194,11 +187,11 @@ LLXMLRPCTransaction::Impl::Impl if (!mHttpRequest) { - mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest); + mHttpRequest = std::make_shared(); } // LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer - httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()); + httpOpts = std::make_shared(); // Delay between repeats will start from 5 sec and grow to 20 sec with each repeat httpOpts->setMinBackoff((LLCore::HttpTime)5E6L); @@ -221,7 +214,7 @@ LLXMLRPCTransaction::Impl::Impl httpOpts->setSSLVerifyHost(vefifySSLCert ? 2 : 0); // LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer - httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()); + httpHeaders = std::make_shared(); httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML); @@ -244,7 +237,7 @@ LLXMLRPCTransaction::Impl::Impl body->append(request.c_str(), request.size()); - mHandler = LLXMLRPCTransaction::Handler::ptr_t(new Handler(mHttpRequest, this)); + mHandler = std::make_shared(mHttpRequest, this); mPostH = mHttpRequest->requestPost(LLCore::HttpRequest::DEFAULT_POLICY_ID, mURI, body.get(), httpOpts, httpHeaders, mHandler); diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 425df0e0f9..37b70964c3 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -345,7 +345,7 @@ void LLLogin::Impl::disconnect() //********************* // LLLogin LLLogin::LLLogin() : - mImpl(new LLLogin::Impl()) + mImpl(std::make_unique()) { } -- cgit v1.3