summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/httpcommon.h
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-11-28 11:03:31 -0500
committerGitHub <noreply@github.com>2025-11-28 18:03:31 +0200
commit54b3f3de64f3749022d95063c7439bfed316645f (patch)
tree62b539ac973ed24ba6baef8aaeda8980c9bd99c0 /indra/llcorehttp/httpcommon.h
parentbae1e1053de5db189b729f7c40e77fa26fe83766 (diff)
#5072 Use make_shared for more efficient ref counting and allocation
Diffstat (limited to 'indra/llcorehttp/httpcommon.h')
-rw-r--r--indra/llcorehttp/httpcommon.h14
1 files changed, 7 insertions, 7 deletions
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<Details>(new Details(LLCORE, HE_SUCCESS));
+ mDetails = std::make_shared<Details>(LLCORE, HE_SUCCESS);
}
HttpStatus(type_enum_t type, short status)
{
- mDetails = std::shared_ptr<Details>(new Details(type, status));
+ mDetails = std::make_shared<Details>(type, status);
}
HttpStatus(int http_status)
{
- mDetails = std::shared_ptr<Details>(new Details(http_status,
- (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR));
+ mDetails = std::make_shared<Details>(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<Details>(new Details(http_status,
- (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR));
+ mDetails = std::make_shared<Details>(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<Details>(new Details(*rhs.mDetails));
+ mDetails = std::make_shared<Details>(*rhs.mDetails);
return *this;
}