summaryrefslogtreecommitdiff
path: root/indra/llcommon
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/llcommon
parentbae1e1053de5db189b729f7c40e77fa26fe83766 (diff)
#5072 Use make_shared for more efficient ref counting and allocation
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llapr.cpp2
-rw-r--r--indra/llcommon/llleap.cpp2
-rw-r--r--indra/llcommon/llstring.h4
3 files changed, 4 insertions, 4 deletions
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<std::mutex>();
}
}
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<LLLeapListener>(
[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<T>::getTokens(const string_type& string, std::vector<strin
// (unless there ARE no escapes).
std::unique_ptr< LLStringUtilBaseImpl::InString<T> > instrp;
if (escapes.empty())
- instrp.reset(new LLStringUtilBaseImpl::InString<T>(string.begin(), string.end()));
+ instrp = std::make_unique<LLStringUtilBaseImpl::InString<T>>(string.begin(), string.end());
else
- instrp.reset(new LLStringUtilBaseImpl::InEscString<T>(string.begin(), string.end(), escapes));
+ instrp = std::make_unique<LLStringUtilBaseImpl::InEscString<T>>(string.begin(), string.end(), escapes);
LLStringUtilBaseImpl::getTokens(*instrp, tokens, drop_delims, keep_delims, quotes);
}