summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorAiraYumi <aira.youme@airanyumi.net>2024-01-06 23:29:06 +0900
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-01-08 23:29:21 +0200
commit7c8907522fe6600918dacc15ee138ca72b2cf35e (patch)
tree89faecf942331de07a1fa8b8c60a04e0e2c74139 /indra/llcommon
parent5a829048827a1b496401db5b715554694436fd9a (diff)
replace boost library to standard
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/lldoubledispatch.h2
-rw-r--r--indra/llcommon/llerror.cpp8
-rw-r--r--indra/llcommon/llerrorcontrol.h2
-rw-r--r--indra/llcommon/llinitparam.h2
-rw-r--r--indra/llcommon/llleap.cpp4
-rw-r--r--indra/llcommon/llprocess.h2
-rw-r--r--indra/llcommon/llrun.h2
-rw-r--r--indra/llcommon/llstring.h2
-rw-r--r--indra/llcommon/tests/llerror_test.cpp30
-rw-r--r--indra/llcommon/tests/lleventcoro_test.cpp8
-rw-r--r--indra/llcommon/tests/llinstancetracker_test.cpp4
-rw-r--r--indra/llcommon/tests/wrapllerrs.h4
12 files changed, 35 insertions, 35 deletions
diff --git a/indra/llcommon/lldoubledispatch.h b/indra/llcommon/lldoubledispatch.h
index 8ed295b6f1..ce6731e864 100644
--- a/indra/llcommon/lldoubledispatch.h
+++ b/indra/llcommon/lldoubledispatch.h
@@ -255,7 +255,7 @@ private:
};
/// shared_ptr manages Entry lifespan for us
- typedef boost::shared_ptr<EntryBase> EntryPtr;
+ typedef std::shared_ptr<EntryBase> EntryPtr;
/// use a @c list to make it easy to insert
typedef std::list<EntryPtr> DispatchTable;
DispatchTable mDispatch;
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 414515854a..4268f107e9 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1070,7 +1070,7 @@ namespace LLError
//
// NOTE!!! Requires external mutex lock!!!
template <typename RECORDER>
- std::pair<boost::shared_ptr<RECORDER>, Recorders::iterator>
+ std::pair<std::shared_ptr<RECORDER>, Recorders::iterator>
findRecorderPos(SettingsConfigPtr &s)
{
// Since we promise to return an iterator, use a classic iterator
@@ -1081,7 +1081,7 @@ namespace LLError
// *it is a RecorderPtr, a shared_ptr<Recorder>. Use a
// dynamic_pointer_cast to try to downcast to test if it's also a
// shared_ptr<RECORDER>.
- auto ptr = boost::dynamic_pointer_cast<RECORDER>(*it);
+ auto ptr = std::dynamic_pointer_cast<RECORDER>(*it);
if (ptr)
{
// found the entry we want
@@ -1101,7 +1101,7 @@ namespace LLError
// shared_ptr might be empty (operator!() returns true) if there was no
// such RECORDER subclass instance in mRecorders.
template <typename RECORDER>
- boost::shared_ptr<RECORDER> findRecorder()
+ std::shared_ptr<RECORDER> findRecorder()
{
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
LLMutexLock lock(&s->mRecorderMutex);
@@ -1134,7 +1134,7 @@ namespace LLError
if (!file_name.empty())
{
- boost::shared_ptr<RecordToFile> recordToFile(new RecordToFile(file_name));
+ std::shared_ptr<RecordToFile> recordToFile(new RecordToFile(file_name));
if (recordToFile->okay())
{
addRecorder(recordToFile);
diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h
index 57f10b7895..77b187a80f 100644
--- a/indra/llcommon/llerrorcontrol.h
+++ b/indra/llcommon/llerrorcontrol.h
@@ -174,7 +174,7 @@ namespace LLError
bool mWantsMultiline;
};
- typedef boost::shared_ptr<Recorder> RecorderPtr;
+ typedef std::shared_ptr<Recorder> RecorderPtr;
/**
* Instantiate GenericRecorder with a callable(level, message) to get
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h
index 9edc7e40f3..e0d0ab9ac7 100644
--- a/indra/llcommon/llinitparam.h
+++ b/indra/llcommon/llinitparam.h
@@ -627,7 +627,7 @@ namespace LLInitParam
UserData* mUserData;
};
- typedef boost::shared_ptr<ParamDescriptor> ParamDescriptorPtr;
+ typedef std::shared_ptr<ParamDescriptor> ParamDescriptorPtr;
// each derived Block class keeps a static data structure maintaining offsets to various params
class LL_COMMON_API BlockDescriptor
diff --git a/indra/llcommon/llleap.cpp b/indra/llcommon/llleap.cpp
index 8f88e728ce..b2b1162f63 100644
--- a/indra/llcommon/llleap.cpp
+++ b/indra/llcommon/llleap.cpp
@@ -462,10 +462,10 @@ private:
LLProcessPtr mChild;
LLTempBoundListener
mStdinConnection, mStdoutConnection, mStdoutDataConnection, mStderrConnection;
- boost::scoped_ptr<LLEventPump::Blocker> mBlocker;
+ std::unique_ptr<LLEventPump::Blocker> mBlocker;
LLProcess::ReadPipe::size_type mExpect;
LLError::RecorderPtr mRecorder;
- boost::scoped_ptr<LLLeapListener> mListener;
+ std::unique_ptr<LLLeapListener> mListener;
};
// These must follow the declaration of LLLeapImpl, so they may as well be last.
diff --git a/indra/llcommon/llprocess.h b/indra/llcommon/llprocess.h
index 0842f2eb07..c57821bf52 100644
--- a/indra/llcommon/llprocess.h
+++ b/indra/llcommon/llprocess.h
@@ -51,7 +51,7 @@ class LLEventPump;
class LLProcess;
/// LLProcess instances are created on the heap by static factory methods and
/// managed by ref-counted pointers.
-typedef boost::shared_ptr<LLProcess> LLProcessPtr;
+typedef std::shared_ptr<LLProcess> LLProcessPtr;
/**
* LLProcess handles launching an external process with specified command line
diff --git a/indra/llcommon/llrun.h b/indra/llcommon/llrun.h
index d610f86234..42e3d9b47a 100644
--- a/indra/llcommon/llrun.h
+++ b/indra/llcommon/llrun.h
@@ -48,7 +48,7 @@ public:
/**
* @brief The pointer to a runnable.
*/
- typedef boost::shared_ptr<LLRunnable> run_ptr_t;
+ typedef std::shared_ptr<LLRunnable> run_ptr_t;
/**
* @brief The handle for use in the API.
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 1fd6cac14a..61fc47e4d0 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -1199,7 +1199,7 @@ void LLStringUtilBase<T>::getTokens(const string_type& string, std::vector<strin
{
// This overload must deal with escapes. Delegate that to InEscString
// (unless there ARE no escapes).
- boost::scoped_ptr< LLStringUtilBaseImpl::InString<T> > instrp;
+ std::unique_ptr< LLStringUtilBaseImpl::InString<T> > instrp;
if (escapes.empty())
instrp.reset(new LLStringUtilBaseImpl::InString<T>(string.begin(), string.end()));
else
diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp
index 148c18aabe..b4cdbdc6bf 100644
--- a/indra/llcommon/tests/llerror_test.cpp
+++ b/indra/llcommon/tests/llerror_test.cpp
@@ -153,27 +153,27 @@ namespace tut
int countMessages()
{
- return boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->countMessages();
+ return std::dynamic_pointer_cast<TestRecorder>(mRecorder)->countMessages();
}
void clearMessages()
{
- boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->clearMessages();
+ std::dynamic_pointer_cast<TestRecorder>(mRecorder)->clearMessages();
}
void setWantsTime(bool t)
{
- boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->showTime(t);
+ std::dynamic_pointer_cast<TestRecorder>(mRecorder)->showTime(t);
}
void setWantsMultiline(bool t)
{
- boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->showMultiline(t);
+ std::dynamic_pointer_cast<TestRecorder>(mRecorder)->showMultiline(t);
}
std::string message(int n)
{
- return boost::dynamic_pointer_cast<TestRecorder>(mRecorder)->message(n);
+ return std::dynamic_pointer_cast<TestRecorder>(mRecorder)->message(n);
}
void ensure_message_count(int expectedCount)
@@ -497,12 +497,12 @@ namespace
void testLogName(LLError::RecorderPtr recorder, LogFromFunction f,
const std::string& class_name = "")
{
- boost::dynamic_pointer_cast<tut::TestRecorder>(recorder)->clearMessages();
+ std::dynamic_pointer_cast<tut::TestRecorder>(recorder)->clearMessages();
std::string name = f(false);
f(true);
- std::string messageWithoutName = boost::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(0);
- std::string messageWithName = boost::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(1);
+ std::string messageWithoutName = std::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(0);
+ std::string messageWithName = std::dynamic_pointer_cast<tut::TestRecorder>(recorder)->message(1);
ensure_has(name + " logged without name",
messageWithoutName, name);
@@ -691,13 +691,13 @@ namespace tut
LL_INFOS() << "boo" << LL_ENDL;
ensure_message_field_equals(0, MSG_FIELD, "boo");
- ensure_equals("alt recorder count", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 1);
- ensure_contains("alt recorder message 0", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(0), "boo");
+ ensure_equals("alt recorder count", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 1);
+ ensure_contains("alt recorder message 0", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(0), "boo");
LLError::setTimeFunction(roswell);
LLError::RecorderPtr anotherRecorder(new TestRecorder());
- boost::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->showTime(true);
+ std::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->showTime(true);
LLError::addRecorder(anotherRecorder);
LL_INFOS() << "baz" << LL_ENDL;
@@ -705,10 +705,10 @@ namespace tut
std::string when = roswell();
ensure_message_does_not_contain(1, when);
- ensure_equals("alt recorder count", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 2);
- ensure_does_not_contain("alt recorder message 1", boost::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(1), when);
- ensure_equals("another recorder count", boost::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->countMessages(), 1);
- ensure_contains("another recorder message 0", boost::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->message(0), when);
+ ensure_equals("alt recorder count", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->countMessages(), 2);
+ ensure_does_not_contain("alt recorder message 1", std::dynamic_pointer_cast<TestRecorder>(altRecorder)->message(1), when);
+ ensure_equals("another recorder count", std::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->countMessages(), 1);
+ ensure_contains("another recorder message 0", std::dynamic_pointer_cast<TestRecorder>(anotherRecorder)->message(0), when);
LLError::removeRecorder(altRecorder);
LLError::removeRecorder(anotherRecorder);
diff --git a/indra/llcommon/tests/lleventcoro_test.cpp b/indra/llcommon/tests/lleventcoro_test.cpp
index 032923a108..01104545c6 100644
--- a/indra/llcommon/tests/lleventcoro_test.cpp
+++ b/indra/llcommon/tests/lleventcoro_test.cpp
@@ -101,7 +101,7 @@ namespace tut
int which;
LLTestApp testApp;
- void explicit_wait(boost::shared_ptr<LLCoros::Promise<std::string>>& cbp);
+ void explicit_wait(std::shared_ptr<LLCoros::Promise<std::string>>& cbp);
void waitForEventOn1();
void coroPump();
void postAndWait1();
@@ -111,7 +111,7 @@ namespace tut
typedef coroutine_group::object object;
coroutine_group coroutinegrp("coroutine");
- void test_data::explicit_wait(boost::shared_ptr<LLCoros::Promise<std::string>>& cbp)
+ void test_data::explicit_wait(std::shared_ptr<LLCoros::Promise<std::string>>& cbp)
{
BEGIN
{
@@ -127,7 +127,7 @@ namespace tut
// For test purposes, instead of handing 'callback' (or an
// adapter) off to some I/O subsystem, we'll just pass it back to
// our caller.
- cbp = boost::make_shared<LLCoros::Promise<std::string>>();
+ cbp = std::make_shared<LLCoros::Promise<std::string>>();
LLCoros::Future<std::string> future = LLCoros::getFuture(*cbp);
// calling get() on the future causes us to suspend
@@ -146,7 +146,7 @@ namespace tut
DEBUG;
// Construct the coroutine instance that will run explicit_wait.
- boost::shared_ptr<LLCoros::Promise<std::string>> respond;
+ std::shared_ptr<LLCoros::Promise<std::string>> respond;
LLCoros::instance().launch("test<1>",
[this, &respond](){ explicit_wait(respond); });
mSync.bump();
diff --git a/indra/llcommon/tests/llinstancetracker_test.cpp b/indra/llcommon/tests/llinstancetracker_test.cpp
index 5daa29adf4..95af9c2a50 100644
--- a/indra/llcommon/tests/llinstancetracker_test.cpp
+++ b/indra/llcommon/tests/llinstancetracker_test.cpp
@@ -94,7 +94,7 @@ namespace tut
ensure("couldn't find stack Keyed", bool(found));
ensure_equals("found wrong Keyed instance", found.get(), &one);
{
- boost::scoped_ptr<Keyed> two(new Keyed("two"));
+ std::unique_ptr<Keyed> two(new Keyed("two"));
ensure_equals(Keyed::instanceCount(), 2);
auto found = Keyed::getInstance("two");
ensure("couldn't find heap Keyed", bool(found));
@@ -118,7 +118,7 @@ namespace tut
std::weak_ptr<Unkeyed> found = one.getWeak();
ensure(! found.expired());
{
- boost::scoped_ptr<Unkeyed> two(new Unkeyed);
+ std::unique_ptr<Unkeyed> two(new Unkeyed);
ensure_equals(Unkeyed::instanceCount(), 2);
}
ensure_equals(Unkeyed::instanceCount(), 1);
diff --git a/indra/llcommon/tests/wrapllerrs.h b/indra/llcommon/tests/wrapllerrs.h
index d657b329bb..6978c296b3 100644
--- a/indra/llcommon/tests/wrapllerrs.h
+++ b/indra/llcommon/tests/wrapllerrs.h
@@ -218,12 +218,12 @@ public:
/// for the sought string.
std::string messageWith(const std::string& search, bool required=true)
{
- return boost::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->messageWith(search, required);
+ return std::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->messageWith(search, required);
}
std::ostream& streamto(std::ostream& out) const
{
- return boost::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->streamto(out);
+ return std::dynamic_pointer_cast<CaptureLogRecorder>(mRecorder)->streamto(out);
}
friend inline std::ostream& operator<<(std::ostream& out, const CaptureLog& self)