diff --git a/autobuild.xml b/autobuild.xml
index 20a4f5fb7a..8b1ec05e18 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -753,7 +753,7 @@
copyright
Copyright 2014 Apache OpenOffice software
version
- None
+ 1.a01bb6c
name
dictionaries
description
@@ -1098,11 +1098,11 @@
archive
name
common
@@ -1115,7 +1115,7 @@
copyright
Copyright (c) 2000 Cass Everitt
version
- None
+ 1.0.1-dev4
name
glh_linear
description
@@ -1190,11 +1190,11 @@
creds
github
hash
- a193ff65d6db48626d65d96c6124c6efca85e8ec
+ ae2c2a215b1bc2e3f37a67e301926dc405902d1a
hash_algorithm
sha1
url
- https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/108912596
+ https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/136778143
name
darwin64
@@ -1218,11 +1218,11 @@
creds
github
hash
- ebfb82b6143874e7938b9d1e8a70d0a2e28aa818
+ 0393dd75c58f7046bed47e62a8884a78cb02a5c3
hash_algorithm
sha1
url
- https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/108912599
+ https://api.github.com/repos/secondlife/3p-havok-source/releases/assets/136778145
name
windows64
@@ -1823,6 +1823,15 @@
llca
- license
- mit
- license_file
- LICENSES/ca-license.txt
- copyright
- Copyright (c) 2016, Linden Research, Inc.; data provided by the Mozilla NSS Project.
-
version
- 202312051404.0
- name
- llca
+ 202402012004.0
llphysicsextensions_source
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 0e53e2ecbd..daa66d420f 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -64,6 +64,8 @@ Aimee Trescothick
VWR-14711
VWR-14712
VWR-15454
+AiraYumi
+ SL-20781 (github PR #613)
Alejandro Rosenthal
VWR-1184
Aleric Inglewood
@@ -854,6 +856,7 @@ Kadah Coba
Jondan Lundquist
Joosten Briebers
MAINT-7074
+ BUG-225288
Josef Munster
Josette Windlow
Juilan Tripsa
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index e961658390..d8cbe097cd 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -24,12 +24,6 @@
* $/LicenseInfo$
*/
-#if LL_MSVC
-// disable warning about boost::lexical_cast returning uninitialized data
-// when it fails to parse the string
-#pragma warning (disable:4701)
-#endif
-
#include "linden_common.h"
#include "llavatarappearance.h"
@@ -46,14 +40,6 @@
#include "boost/bind.hpp"
#include "boost/tokenizer.hpp"
-
-#if LL_MSVC
-// disable boost::lexical_cast warning
-#pragma warning (disable:4702)
-#endif
-
-#include
-
using namespace LLAvatarAppearanceDefines;
//-----------------------------------------------------------------------------
@@ -230,7 +216,7 @@ void LLAvatarAppearance::initInstance()
for (U32 lod = 0; lod < mesh_dict->mLOD; lod++)
{
LLAvatarJointMesh* mesh = createAvatarJointMesh();
- std::string mesh_name = "m" + mesh_dict->mName + boost::lexical_cast(lod);
+ std::string mesh_name = "m" + mesh_dict->mName + std::to_string(lod);
// We pre-pended an m - need to capitalize first character for camelCase
mesh_name[1] = toupper(mesh_name[1]);
mesh->setName(mesh_name);
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 EntryPtr;
+ typedef std::shared_ptr EntryPtr;
/// use a @c list to make it easy to insert
typedef std::list DispatchTable;
DispatchTable mDispatch;
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 87fc5b1922..999089e9ec 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1081,7 +1081,7 @@ namespace LLError
//
// NOTE!!! Requires external mutex lock!!!
template
- std::pair, Recorders::iterator>
+ std::pair, Recorders::iterator>
findRecorderPos(SettingsConfigPtr &s)
{
// Since we promise to return an iterator, use a classic iterator
@@ -1092,7 +1092,7 @@ namespace LLError
// *it is a RecorderPtr, a shared_ptr. Use a
// dynamic_pointer_cast to try to downcast to test if it's also a
// shared_ptr.
- auto ptr = boost::dynamic_pointer_cast(*it);
+ auto ptr = std::dynamic_pointer_cast(*it);
if (ptr)
{
// found the entry we want
@@ -1112,7 +1112,7 @@ namespace LLError
// shared_ptr might be empty (operator!() returns true) if there was no
// such RECORDER subclass instance in mRecorders.
template
- boost::shared_ptr findRecorder()
+ std::shared_ptr findRecorder()
{
SettingsConfigPtr s = Globals::getInstance()->getSettingsConfig();
LLMutexLock lock(&s->mRecorderMutex);
@@ -1145,7 +1145,7 @@ namespace LLError
if (!file_name.empty())
{
- boost::shared_ptr recordToFile(new RecordToFile(file_name));
+ std::shared_ptr 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 RecorderPtr;
+ typedef std::shared_ptr RecorderPtr;
/**
* Instantiate GenericRecorder with a callable(level, message) to get
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 1a305ec3dc..70931f3a65 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -211,12 +211,21 @@ void LLEventPumps::clear()
}
}
-void LLEventPumps::reset()
+void LLEventPumps::reset(bool log_pumps)
{
// Reset every known LLEventPump instance. Leave it up to each instance to
// decide what to do with the reset() call.
+ if (log_pumps)
+ {
+ LL_INFOS() << "Resetting " << (S32)mPumpMap.size() << " pumps" << LL_ENDL;
+ }
+
for (PumpMap::value_type& pair : mPumpMap)
{
+ if (log_pumps)
+ {
+ LL_INFOS() << "Resetting pump " << pair.first << LL_ENDL;
+ }
pair.second->reset();
}
}
@@ -373,9 +382,11 @@ std::string LLEventPump::inventName(const std::string& pfx)
void LLEventPump::clear()
{
+ LLMutexLock lock(&mConnectionListMutex);
// Destroy the original LLStandardSignal instance, replacing it with a
// whole new one.
mSignal = std::make_shared();
+
mConnections.clear();
}
@@ -383,6 +394,7 @@ void LLEventPump::reset()
{
// Resetting mSignal is supposed to disconnect everything on its own
// But due to crash on 'reset' added explicit cleanup to get more data
+ LLMutexLock lock(&mConnectionListMutex);
ConnectionMap::const_iterator iter = mConnections.begin();
ConnectionMap::const_iterator end = mConnections.end();
while (iter!=end)
@@ -407,6 +419,8 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
return LLBoundListener();
}
+ LLMutexLock lock(&mConnectionListMutex);
+
float nodePosition = 1.0;
// if the supplied name is empty we are not interested in the ordering mechanism
@@ -566,8 +580,9 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
return bound;
}
-LLBoundListener LLEventPump::getListener(const std::string& name) const
+LLBoundListener LLEventPump::getListener(const std::string& name)
{
+ LLMutexLock lock(&mConnectionListMutex);
ConnectionMap::const_iterator found = mConnections.find(name);
if (found != mConnections.end())
{
@@ -579,6 +594,7 @@ LLBoundListener LLEventPump::getListener(const std::string& name) const
void LLEventPump::stopListening(const std::string& name)
{
+ LLMutexLock lock(&mConnectionListMutex);
ConnectionMap::iterator found = mConnections.find(name);
if (found != mConnections.end())
{
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 34fb9ff246..168846c4cd 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -334,7 +334,7 @@ public:
* Reset all known LLEventPump instances
* workaround for DEV-35406 crash on shutdown
*/
- void reset();
+ void reset(bool log_pumps = false);
private:
friend class LLEventPump;
@@ -560,7 +560,7 @@ public:
/// Get the LLBoundListener associated with the passed name (dummy
/// LLBoundListener if not found)
- virtual LLBoundListener getListener(const std::string& name) const;
+ virtual LLBoundListener getListener(const std::string& name);
/**
* Instantiate one of these to block an existing connection:
* @code
@@ -603,6 +603,7 @@ private:
LLHandle mRegistry;
std::string mName;
+ LLMutex mConnectionListMutex;
protected:
virtual LLBoundListener listen_impl(const std::string& name, const LLEventListener&,
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 ParamDescriptorPtr;
+ typedef std::shared_ptr 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 mBlocker;
+ std::unique_ptr mBlocker;
LLProcess::ReadPipe::size_type mExpect;
LLError::RecorderPtr mRecorder;
- boost::scoped_ptr mListener;
+ std::unique_ptr mListener;
};
// These must follow the declaration of LLLeapImpl, so they may as well be last.
diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 2a3f1c68a3..574b9b8b3b 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -38,6 +38,7 @@
#include
#elif LL_LINUX
# include
+# include
#endif
#include "llmemory.h"
@@ -270,72 +271,21 @@ U64 LLMemory::getCurrentRSS()
}
#elif defined(LL_LINUX)
-// Linux RSS appears to have drifted from the implementation below.
-// U64 LLMemory::getCurrentRSS()
-// {
-// static const char statPath[] = "/proc/self/stat";
-// LLFILE *fp = LLFile::fopen(statPath, "r");
-// U64 rss = 0;
-// if (fp == NULL)
-// {
-// LL_WARNS() << "couldn't open " << statPath << LL_ENDL;
-// return 0;
-// }
+U64 LLMemory::getCurrentRSS()
+{
+ struct rusage usage;
-// // Eee-yew! See Documentation/filesystems/proc.txt in your
-// // nearest friendly kernel tree for details.
-
-// {
-// int ret = fscanf(fp, "%*d (%*[^)]) %*c %*d %*d %*d %*d %*d %*d %*d "
-// "%*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d %Lu",
-// &rss);
-// if (ret != 1)
-// {
-// LL_WARNS() << "couldn't parse contents of " << statPath << LL_ENDL;
-// rss = 0;
-// }
-// }
-
-// fclose(fp);
+ if (getrusage(RUSAGE_SELF, &usage) != 0) {
+ // Error handling code could be here
+ return 0;
+ }
-// return rss;
-// }
-#include
-#include
-#include
-#include
-#include
-#include
-
-// return the RSS in bytes. This value is converted to kilobytes implicitly elsewhere.
-U64 LLMemory::getCurrentRSS() {
- namespace fs = std::filesystem;
-
- // Get the page size (static variable)
- static const long pageSize = sysconf(_SC_PAGESIZE);
-
- // Open the /proc/self/statm file
- static const auto statmPath = fs::path("/proc/self/statm");
- std::ifstream statmFile(statmPath);
- if (!statmFile.is_open()) {
- return 0; // Return 0 if the file cannot be opened
- }
-
- // Read the entire line from statm file
- std::string line;
- std::getline(statmFile, line);
- statmFile.close();
-
- // Extract the values from the line
- std::istringstream iss(line);
- long size, rss, shared, text, lib, data, dt;
- iss >> size >> rss >> shared >> text >> lib >> data >> dt;
-
- // Convert pages to bytes and return RSS
- return static_cast( rss * pageSize );
+ // ru_maxrss (since Linux 2.6.32)
+ // This is the maximum resident set size used (in kilobytes).
+ return usage.ru_maxrss * 1024;
}
-//
+
#else
U64 LLMemory::getCurrentRSS()
diff --git a/indra/llcommon/llprocess.cpp b/indra/llcommon/llprocess.cpp
index 0d65762284..0d6a147da3 100644
--- a/indra/llcommon/llprocess.cpp
+++ b/indra/llcommon/llprocess.cpp
@@ -36,7 +36,6 @@
#include "llevents.h"
#include "llexception.h"
-#include
#include
#include
#include
@@ -587,7 +586,7 @@ LLProcess::LLProcess(const LLSDOrParams& params):
// apr_procattr_child_err_set()), or accepting a filename, opening it and
// passing that apr_file_t (simple <, >, 2> redirect emulation).
std::vector select;
- BOOST_FOREACH(const FileParam& fparam, params.files)
+ for (const FileParam& fparam : params.files)
{
// Every iteration, we're going to append an item to 'select'. At the
// top of the loop, its size() is, in effect, an index. Use that to
@@ -684,7 +683,7 @@ LLProcess::LLProcess(const LLSDOrParams& params):
argv.push_back(params.executable().c_str());
// Add arguments. See above remarks about c_str().
- BOOST_FOREACH(const std::string& arg, params.args)
+ for (const std::string& arg : params.args)
{
argv.push_back(arg.c_str());
}
@@ -961,7 +960,7 @@ void LLProcess::handle_status(int reason, int status)
// only be performed if in fact we're going to produce the log message.
LL_DEBUGS("LLProcess") << empty;
std::string reason_str;
- BOOST_FOREACH(const ReasonCode& rcp, reasons)
+ for (const ReasonCode& rcp : reasons)
{
if (reason == rcp.code)
{
@@ -1151,7 +1150,7 @@ std::ostream& operator<<(std::ostream& out, const LLProcess::Params& params)
out << "cd " << LLStringUtil::quote(params.cwd) << ": ";
}
out << LLStringUtil::quote(params.executable);
- BOOST_FOREACH(const std::string& arg, params.args)
+ for (const std::string& arg : params.args)
{
out << ' ' << LLStringUtil::quote(arg);
}
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 LLProcessPtr;
+typedef std::shared_ptr 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 run_ptr_t;
+ typedef std::shared_ptr run_ptr_t;
/**
* @brief The handle for use in the API.
diff --git a/indra/llcommon/llsdutil.h b/indra/llcommon/llsdutil.h
index ad54d1b0be..fdcc052bd0 100644
--- a/indra/llcommon/llsdutil.h
+++ b/indra/llcommon/llsdutil.h
@@ -478,9 +478,9 @@ namespace llsd
{
/*****************************************************************************
-* BOOST_FOREACH() helpers for LLSD
+* range-based for-loop helpers for LLSD
*****************************************************************************/
-/// Usage: BOOST_FOREACH(LLSD item, inArray(someLLSDarray)) { ... }
+/// Usage: for (LLSD item : inArray(someLLSDarray)) { ... }
class inArray
{
public:
@@ -503,7 +503,7 @@ private:
/// MapEntry is what you get from dereferencing an LLSD::map_[const_]iterator.
typedef std::map::value_type MapEntry;
-/// Usage: BOOST_FOREACH([const] MapEntry& e, inMap(someLLSDmap)) { ... }
+/// Usage: for([const] MapEntry& e : inMap(someLLSDmap)) { ... }
class inMap
{
public:
diff --git a/indra/llcommon/llsingleton.cpp b/indra/llcommon/llsingleton.cpp
index 6b1986d0e9..5f1a89670e 100644
--- a/indra/llcommon/llsingleton.cpp
+++ b/indra/llcommon/llsingleton.cpp
@@ -32,7 +32,6 @@
#include "lldependencies.h"
#include "llexception.h"
#include "llcoros.h"
-#include
#include
#include // std::cerr in dire emergency
#include
@@ -411,7 +410,7 @@ void LLSingletonBase::cleanup_()
void LLSingletonBase::deleteAll()
{
// It's essential to traverse these in dependency order.
- BOOST_FOREACH(LLSingletonBase* sp, dep_sort())
+ for (LLSingletonBase* sp : dep_sort())
{
// Capture the class name first: in case of exception, don't count on
// being able to extract it later.
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 7b37600a81..fcebef70a7 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -1222,7 +1222,7 @@ void LLStringUtilBase::getTokens(const string_type& string, std::vector > instrp;
+ std::unique_ptr< LLStringUtilBaseImpl::InString > instrp;
if (escapes.empty())
instrp.reset(new LLStringUtilBaseImpl::InString(string.begin(), string.end()));
else
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index c5787b9704..ff45807228 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -49,7 +49,6 @@
#include "llsdutil.h"
#include
#include
-#include
#include
#include
#include
@@ -917,9 +916,9 @@ void LLMemoryInfo::stream(std::ostream& s) const
// Max key length
size_t key_width(0);
- BOOST_FOREACH(const MapEntry& pair, inMap(mStatsMap))
+ for (const auto& [key, value] : inMap(mStatsMap))
{
- size_t len(pair.first.length());
+ size_t len(key.length());
if (len > key_width)
{
key_width = len;
@@ -927,10 +926,9 @@ void LLMemoryInfo::stream(std::ostream& s) const
}
// Now stream stats
- BOOST_FOREACH(const MapEntry& pair, inMap(mStatsMap))
+ for (const auto& [key, value] : inMap(mStatsMap))
{
- s << pfx << std::setw(narrow(key_width+1)) << (pair.first + ':') << ' ';
- LLSD value(pair.second);
+ s << pfx << std::setw(narrow(key_width+1)) << (key + ':') << ' ';
if (value.isInteger())
s << std::setw(12) << value.asInteger();
else if (value.isReal())
diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp
index d4ca7bce65..e3bf4c413f 100644
--- a/indra/llcommon/tests/llerror_test.cpp
+++ b/indra/llcommon/tests/llerror_test.cpp
@@ -156,27 +156,27 @@ namespace tut
int countMessages()
{
- return boost::dynamic_pointer_cast(mRecorder)->countMessages();
+ return std::dynamic_pointer_cast(mRecorder)->countMessages();
}
void clearMessages()
{
- boost::dynamic_pointer_cast(mRecorder)->clearMessages();
+ std::dynamic_pointer_cast(mRecorder)->clearMessages();
}
void setWantsTime(bool t)
{
- boost::dynamic_pointer_cast(mRecorder)->showTime(t);
+ std::dynamic_pointer_cast(mRecorder)->showTime(t);
}
void setWantsMultiline(bool t)
{
- boost::dynamic_pointer_cast(mRecorder)->showMultiline(t);
+ std::dynamic_pointer_cast(mRecorder)->showMultiline(t);
}
std::string message(int n)
{
- return boost::dynamic_pointer_cast(mRecorder)->message(n);
+ return std::dynamic_pointer_cast(mRecorder)->message(n);
}
void ensure_message_count(int expectedCount)
@@ -500,12 +500,12 @@ namespace
void testLogName(LLError::RecorderPtr recorder, LogFromFunction f,
const std::string& class_name = "")
{
- boost::dynamic_pointer_cast(recorder)->clearMessages();
+ std::dynamic_pointer_cast(recorder)->clearMessages();
std::string name = f(false);
f(true);
- std::string messageWithoutName = boost::dynamic_pointer_cast(recorder)->message(0);
- std::string messageWithName = boost::dynamic_pointer_cast(recorder)->message(1);
+ std::string messageWithoutName = std::dynamic_pointer_cast(recorder)->message(0);
+ std::string messageWithName = std::dynamic_pointer_cast(recorder)->message(1);
ensure_has(name + " logged without name",
messageWithoutName, name);
@@ -694,13 +694,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(altRecorder)->countMessages(), 1);
- ensure_contains("alt recorder message 0", boost::dynamic_pointer_cast(altRecorder)->message(0), "boo");
+ ensure_equals("alt recorder count", std::dynamic_pointer_cast(altRecorder)->countMessages(), 1);
+ ensure_contains("alt recorder message 0", std::dynamic_pointer_cast(altRecorder)->message(0), "boo");
LLError::setTimeFunction(roswell);
LLError::RecorderPtr anotherRecorder(new TestRecorder());
- boost::dynamic_pointer_cast(anotherRecorder)->showTime(true);
+ std::dynamic_pointer_cast(anotherRecorder)->showTime(true);
LLError::addRecorder(anotherRecorder);
LL_INFOS() << "baz" << LL_ENDL;
@@ -708,10 +708,10 @@ namespace tut
std::string when = roswell();
ensure_message_does_not_contain(1, when);
- ensure_equals("alt recorder count", boost::dynamic_pointer_cast(altRecorder)->countMessages(), 2);
- ensure_does_not_contain("alt recorder message 1", boost::dynamic_pointer_cast(altRecorder)->message(1), when);
- ensure_equals("another recorder count", boost::dynamic_pointer_cast(anotherRecorder)->countMessages(), 1);
- ensure_contains("another recorder message 0", boost::dynamic_pointer_cast(anotherRecorder)->message(0), when);
+ ensure_equals("alt recorder count", std::dynamic_pointer_cast(altRecorder)->countMessages(), 2);
+ ensure_does_not_contain("alt recorder message 1", std::dynamic_pointer_cast(altRecorder)->message(1), when);
+ ensure_equals("another recorder count", std::dynamic_pointer_cast(anotherRecorder)->countMessages(), 1);
+ ensure_contains("another recorder message 0", std::dynamic_pointer_cast(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 4a1d4b8ba9..5840cacd63 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>& cbp);
+ void explicit_wait(std::shared_ptr>& 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>& cbp)
+ void test_data::explicit_wait(std::shared_ptr>& 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>();
+ cbp = std::make_shared>();
LLCoros::Future 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> respond;
+ std::shared_ptr> 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 two(new Keyed("two"));
+ std::unique_ptr 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 found = one.getWeak();
ensure(! found.expired());
{
- boost::scoped_ptr two(new Unkeyed);
+ std::unique_ptr two(new Unkeyed);
ensure_equals(Unkeyed::instanceCount(), 2);
}
ensure_equals(Unkeyed::instanceCount(), 1);
diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp
index b6b297b8d7..628f046f55 100644
--- a/indra/llcommon/tests/llprocess_test.cpp
+++ b/indra/llcommon/tests/llprocess_test.cpp
@@ -21,7 +21,6 @@
// external library headers
#include "llapr.h"
#include "apr_thread_proc.h"
-#include
#include
#include
#include
@@ -323,7 +322,7 @@ namespace tut
{
/*==========================================================================*|
std::string reason_str;
- BOOST_FOREACH(const ReasonCode& rcp, reasons)
+ for (const ReasonCode& rcp : reasons)
{
if (reason == rcp.code)
{
@@ -554,7 +553,7 @@ namespace tut
catch (const failure&)
{
std::cout << "History:\n";
- BOOST_FOREACH(const Item& item, history)
+ for (const Item& item : history)
{
std::string what(item.what);
if ((! what.empty()) && what[what.length() - 1] == '\n')
diff --git a/indra/llcommon/tests/llstreamqueue_test.cpp b/indra/llcommon/tests/llstreamqueue_test.cpp
index 050ad5c5bf..8af057328b 100644
--- a/indra/llcommon/tests/llstreamqueue_test.cpp
+++ b/indra/llcommon/tests/llstreamqueue_test.cpp
@@ -15,9 +15,6 @@
#include "llstreamqueue.h"
// STL headers
#include
-// std headers
-// external library headers
-#include
// other Linden headers
#include "../test/lltut.h"
#include "stringize.h"
@@ -133,7 +130,7 @@ namespace tut
std::streamsize leave(5); // len("craft") above
std::streamsize skip(total - leave);
std::streamsize written(0);
- BOOST_FOREACH(const std::string& block, blocks)
+ for (const std::string& block : blocks)
{
written += strq.write(&block[0], block.length());
ensure_equals("size() after write()", strq.size(), written);
@@ -152,7 +149,7 @@ namespace tut
{
set_test_name("concatenate blocks");
std::string blocks[] = { "abcd", "efghij", "klmnopqrs" };
- BOOST_FOREACH(const std::string& block, blocks)
+ for (const std::string& block : blocks)
{
strq.write(&block[0], block.length());
}
@@ -170,7 +167,7 @@ namespace tut
{
set_test_name("split blocks");
std::string blocks[] = { "abcdefghijklm", "nopqrstuvwxyz" };
- BOOST_FOREACH(const std::string& block, blocks)
+ for (const std::string& block : blocks)
{
strq.write(&block[0], block.length());
}
diff --git a/indra/llcommon/tests/lltreeiterators_test.cpp b/indra/llcommon/tests/lltreeiterators_test.cpp
index 1d619867d4..b9c7a70c07 100644
--- a/indra/llcommon/tests/lltreeiterators_test.cpp
+++ b/indra/llcommon/tests/lltreeiterators_test.cpp
@@ -38,7 +38,6 @@
// external library headers
#include
#include
-#include
// associated header
#include "../lltreeiterators.h"
@@ -402,7 +401,7 @@ private:
*
* Example:
* @code
- * BOOST_FOREACH(TreeNodePtr node, getRootRange(somenode))
+ * for (TreeNodePtr node : getRootRange(somenode))
* {
* std::cout << node->name() << '\n';
* }
@@ -424,7 +423,7 @@ getRootRange(const TreeNodePtr& node)
*
* Example:
* @code
- * BOOST_FOREACH(TreeNodePtr node, getWalkRange(root))
+ * for (TreeNodePtr node : getWalkRange(root))
* {
* std::cout << node->name() << '\n';
* }
@@ -520,7 +519,7 @@ public:
*
* Example usage:
* @code
- * BOOST_FOREACH(EnhancedTreeNodePtr node, somenode->getRootRange())
+ * for (EnhancedTreeNodePtr node : somenode->getRootRange())
* {
* std::cout << node->name() << '\n';
* }
@@ -564,7 +563,7 @@ public:
*
* Example usage:
* @code
- * BOOST_FOREACH(EnhancedTreeNodePtr node, somenode->getWalkRange())
+ * for (EnhancedTreeNodePtr node : somenode->getWalkRange())
* {
* std::cout << node->name() << '\n';
* }
@@ -644,7 +643,7 @@ LLLinkedIter PlainTree_child_end(PlainTree* node)
*
* Example:
* @code
- * BOOST_FOREACH(PlainTree* node, getRootRange(somenode))
+ * for (PlainTree* node : getRootRange(somenode))
* {
* std::cout << node->name() << '\n';
* }
@@ -668,7 +667,7 @@ getRootRange(PlainTree* node)
*
* Example:
* @code
- * BOOST_FOREACH(PlainTree* node, getWalkRange(root))
+ * for (PlainTree* node : getWalkRange(root))
* {
* std::cout << node->name() << '\n';
* }
@@ -1103,18 +1102,18 @@ namespace tut
// This test function illustrates the looping techniques described in the
// comments for the getRootRange() free function, the
// EnhancedTreeNode::root_range template and the
- // EnhancedTreeNode::getRootRange() method. Obviously the BOOST_FOREACH()
+ // EnhancedTreeNode::getRootRange() method. Obviously the for()
// forms are more succinct.
TreeNodePtr tnroot(example_tree());
TreeNodePtr tnB2b(get_B2b
(tnroot, boost::bind(&TreeNode::child_begin, _1)));
- std::string desc1("BOOST_FOREACH(TreeNodePr, getRootRange(tnB2b))");
+ std::string desc1("for (TreeNodePr : getRootRange(tnB2b))");
// std::cout << desc1 << "\n";
// Although we've commented out the output statement, ensure that the
// loop construct is still valid, as promised by the getRootRange()
// documentation.
- BOOST_FOREACH(TreeNodePtr node, getRootRange(tnB2b))
+ for (TreeNodePtr node : getRootRange(tnB2b))
{
// std::cout << node->name() << '\n';
}
@@ -1137,9 +1136,9 @@ namespace tut
// std::cout << (*ri)->name() << '\n';
}
- std::string desc2("BOOST_FOREACH(EnhancedTreeNodePtr node, etnB2b->getRootRange())");
+ std::string desc2("for (EnhancedTreeNodePtr node : etnB2b->getRootRange())");
// std::cout << desc2 << '\n';
- BOOST_FOREACH(EnhancedTreeNodePtr node, etnB2b->getRootRange())
+ for (EnhancedTreeNodePtr node : etnB2b->getRootRange())
{
// std::cout << node->name() << '\n';
}
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(mRecorder)->messageWith(search, required);
+ return std::dynamic_pointer_cast(mRecorder)->messageWith(search, required);
}
std::ostream& streamto(std::ostream& out) const
{
- return boost::dynamic_pointer_cast(mRecorder)->streamto(out);
+ return std::dynamic_pointer_cast(mRecorder)->streamto(out);
}
friend inline std::ostream& operator<<(std::ostream& out, const CaptureLog& self)
diff --git a/indra/llcorehttp/_httplibcurl.h b/indra/llcorehttp/_httplibcurl.h
index a71eae59c0..61ecc492af 100644
--- a/indra/llcorehttp/_httplibcurl.h
+++ b/indra/llcorehttp/_httplibcurl.h
@@ -65,7 +65,7 @@ private:
void operator=(const HttpLibcurl &); // Not defined
public:
- typedef boost::shared_ptr opReqPtr_t;
+ typedef std::shared_ptr opReqPtr_t;
/// Give cycles to libcurl to run active requests. Completed
/// operations (successful or failed) will be retried or handed
diff --git a/indra/llcorehttp/_httpoperation.cpp b/indra/llcorehttp/_httpoperation.cpp
index 3b64018132..c3a9bcaf54 100644
--- a/indra/llcorehttp/_httpoperation.cpp
+++ b/indra/llcorehttp/_httpoperation.cpp
@@ -58,7 +58,7 @@ HttpOperation::handleMap_t HttpOperation::mHandleMap;
LLCoreInt::HttpMutex HttpOperation::mOpMutex;
HttpOperation::HttpOperation():
- boost::enable_shared_from_this(),
+ std::enable_shared_from_this(),
mReplyQueue(),
mUserHandler(),
mReqPolicy(HttpRequest::DEFAULT_POLICY_ID),
diff --git a/indra/llcorehttp/_httpoperation.h b/indra/llcorehttp/_httpoperation.h
index 8c1364bab4..b07ef76d49 100644
--- a/indra/llcorehttp/_httpoperation.h
+++ b/indra/llcorehttp/_httpoperation.h
@@ -69,12 +69,12 @@ class HttpService;
/// and those interfaces establish the access rules.
class HttpOperation : private boost::noncopyable,
- public boost::enable_shared_from_this
+ public std::enable_shared_from_this
{
public:
- typedef boost::shared_ptr ptr_t;
- typedef boost::weak_ptr wptr_t;
- typedef boost::shared_ptr HttpReplyQueuePtr_t;
+ typedef std::shared_ptr ptr_t;
+ typedef std::weak_ptr wptr_t;
+ typedef std::shared_ptr HttpReplyQueuePtr_t;
/// Threading: called by consumer thread.
HttpOperation();
@@ -157,12 +157,12 @@ public:
HttpHandle getHandle();
template< class OPT >
- static boost::shared_ptr< OPT > fromHandle(HttpHandle handle)
+ static std::shared_ptr< OPT > fromHandle(HttpHandle handle)
{
ptr_t ptr = findByHandle(handle);
if (!ptr)
- return boost::shared_ptr< OPT >();
- return boost::dynamic_pointer_cast< OPT >(ptr);
+ return std::shared_ptr< OPT >();
+ return std::dynamic_pointer_cast< OPT >(ptr);
}
protected:
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 50317a8f0b..908b35ee36 100644
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -203,7 +203,7 @@ HttpOpRequest::~HttpOpRequest()
void HttpOpRequest::stageFromRequest(HttpService * service)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
- HttpOpRequest::ptr_t self(boost::dynamic_pointer_cast(shared_from_this()));
+ HttpOpRequest::ptr_t self(std::dynamic_pointer_cast(shared_from_this()));
service->getPolicy().addOp(self); // transfers refcount
}
@@ -211,7 +211,7 @@ void HttpOpRequest::stageFromRequest(HttpService * service)
void HttpOpRequest::stageFromReady(HttpService * service)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
- HttpOpRequest::ptr_t self(boost::dynamic_pointer_cast(shared_from_this()));
+ HttpOpRequest::ptr_t self(std::dynamic_pointer_cast(shared_from_this()));
service->getTransport().addOp(self); // transfers refcount
}
@@ -292,7 +292,7 @@ void HttpOpRequest::visitNotifier(HttpRequest * request)
// HttpOpRequest::ptr_t HttpOpRequest::fromHandle(HttpHandle handle)
// {
//
-// return boost::dynamic_pointer_cast((static_cast(handle))->shared_from_this());
+// return std::dynamic_pointer_cast((static_cast(handle))->shared_from_this());
// }
diff --git a/indra/llcorehttp/_httpoprequest.h b/indra/llcorehttp/_httpoprequest.h
index 24f251c367..5396e7bf49 100644
--- a/indra/llcorehttp/_httpoprequest.h
+++ b/indra/llcorehttp/_httpoprequest.h
@@ -66,7 +66,7 @@ class BufferArray;
class HttpOpRequest : public HttpOperation
{
public:
- typedef boost::shared_ptr ptr_t;
+ typedef std::shared_ptr ptr_t;
HttpOpRequest();
diff --git a/indra/llcorehttp/_httpopsetget.h b/indra/llcorehttp/_httpopsetget.h
index eabd41e79f..04ab2446ef 100644
--- a/indra/llcorehttp/_httpopsetget.h
+++ b/indra/llcorehttp/_httpopsetget.h
@@ -53,7 +53,7 @@ namespace LLCore
class HttpOpSetGet : public HttpOperation
{
public:
- typedef boost::shared_ptr ptr_t;
+ typedef std::shared_ptr ptr_t;
HttpOpSetGet();
diff --git a/indra/llcorehttp/_httppolicy.h b/indra/llcorehttp/_httppolicy.h
index 0b8806a3e2..955f757c93 100644
--- a/indra/llcorehttp/_httppolicy.h
+++ b/indra/llcorehttp/_httppolicy.h
@@ -60,7 +60,7 @@ private:
void operator=(const HttpPolicy &); // Not defined
public:
- typedef boost::shared_ptr opReqPtr_t;
+ typedef std::shared_ptr opReqPtr_t;
/// Threading: called by init thread.
HttpRequest::policy_t createPolicyClass();
diff --git a/indra/llcorehttp/_httpreplyqueue.h b/indra/llcorehttp/_httpreplyqueue.h
index 33e205c1c9..2de26249ef 100644
--- a/indra/llcorehttp/_httpreplyqueue.h
+++ b/indra/llcorehttp/_httpreplyqueue.h
@@ -63,8 +63,8 @@ class HttpReplyQueue : private boost::noncopyable
{
public:
- typedef boost::shared_ptr opPtr_t;
- typedef boost::shared_ptr ptr_t;
+ typedef std::shared_ptr opPtr_t;
+ typedef std::shared_ptr ptr_t;
HttpReplyQueue();
virtual ~HttpReplyQueue();
diff --git a/indra/llcorehttp/_httprequestqueue.h b/indra/llcorehttp/_httprequestqueue.h
index f0296f30e3..52369df174 100644
--- a/indra/llcorehttp/_httprequestqueue.h
+++ b/indra/llcorehttp/_httprequestqueue.h
@@ -61,7 +61,7 @@ private:
void operator=(const HttpRequestQueue &); // Not defined
public:
- typedef boost::shared_ptr opPtr_t;
+ typedef std::shared_ptr opPtr_t;
static void init();
static void term();
diff --git a/indra/llcorehttp/httpcommon.h b/indra/llcorehttp/httpcommon.h
index 18505e0aad..7fe5c48edf 100644
--- a/indra/llcorehttp/httpcommon.h
+++ b/indra/llcorehttp/httpcommon.h
@@ -301,24 +301,24 @@ struct HttpStatus
HttpStatus()
{
- mDetails = boost::shared_ptr(new Details(LLCORE, HE_SUCCESS));
+ mDetails = std::shared_ptr(new Details(LLCORE, HE_SUCCESS));
}
HttpStatus(type_enum_t type, short status)
{
- mDetails = boost::shared_ptr(new Details(type, status));
+ mDetails = std::shared_ptr(new Details(type, status));
}
HttpStatus(int http_status)
{
- mDetails = boost::shared_ptr(new Details(http_status,
+ mDetails = std::shared_ptr(new 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 = boost::shared_ptr(new Details(http_status,
+ mDetails = std::shared_ptr(new Details(http_status,
(http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR));
llassert(http_status >= 100 && http_status <= 999);
mDetails->mMessage = message;
@@ -341,7 +341,7 @@ struct HttpStatus
HttpStatus & clone(const HttpStatus &rhs)
{
- mDetails = boost::shared_ptr(new Details(*rhs.mDetails));
+ mDetails = std::shared_ptr(new Details(*rhs.mDetails));
return *this;
}
@@ -490,14 +490,14 @@ private:
LLSD mErrorData;
};
- boost::shared_ptr mDetails;
+ std::shared_ptr mDetails;
}; // end struct HttpStatus
/// A namespace for several free methods and low level utilities.
namespace LLHttp
{
- typedef boost::shared_ptr CURL_ptr;
+ typedef std::shared_ptr CURL_ptr;
void initialize();
void cleanup();
diff --git a/indra/llcorehttp/httphandler.h b/indra/llcorehttp/httphandler.h
index 65e043f5d3..4cfb2598c7 100644
--- a/indra/llcorehttp/httphandler.h
+++ b/indra/llcorehttp/httphandler.h
@@ -58,8 +58,8 @@ class HttpResponse;
class HttpHandler
{
public:
- typedef boost::shared_ptr ptr_t;
- typedef boost::weak_ptr wptr_t;
+ typedef std::shared_ptr ptr_t;
+ typedef std::weak_ptr wptr_t;
virtual ~HttpHandler()
{ }
diff --git a/indra/llcorehttp/httpheaders.h b/indra/llcorehttp/httpheaders.h
index b9168cb6ec..e7cf4037bf 100644
--- a/indra/llcorehttp/httpheaders.h
+++ b/indra/llcorehttp/httpheaders.h
@@ -85,7 +85,7 @@ public:
typedef container_t::const_reverse_iterator const_reverse_iterator;
typedef container_t::value_type value_type;
typedef container_t::size_type size_type;
- typedef boost::shared_ptr ptr_t;
+ typedef std::shared_ptr ptr_t;
public:
/// @post In addition to the instance, caller has a refcount
diff --git a/indra/llcorehttp/httpoptions.h b/indra/llcorehttp/httpoptions.h
index ef12edf316..2023e6a6f7 100644
--- a/indra/llcorehttp/httpoptions.h
+++ b/indra/llcorehttp/httpoptions.h
@@ -60,7 +60,7 @@ class HttpOptions : private boost::noncopyable
public:
HttpOptions();
- typedef boost::shared_ptr ptr_t;
+ typedef std::shared_ptr ptr_t;
virtual ~HttpOptions(); // Use release()
diff --git a/indra/llcorehttp/httprequest.h b/indra/llcorehttp/httprequest.h
index ca4b9e92bc..857a034a7b 100644
--- a/indra/llcorehttp/httprequest.h
+++ b/indra/llcorehttp/httprequest.h
@@ -96,8 +96,8 @@ private:
public:
typedef unsigned int policy_t;
- typedef boost::shared_ptr ptr_t;
- typedef boost::weak_ptr wptr_t;
+ typedef std::shared_ptr ptr_t;
+ typedef std::weak_ptr wptr_t;
public:
/// @name PolicyMethods
/// @{
@@ -627,7 +627,7 @@ public:
protected:
private:
- typedef boost::shared_ptr HttpReplyQueuePtr_t;
+ typedef std::shared_ptr HttpReplyQueuePtr_t;
/// @name InstanceData
///
diff --git a/indra/llcorehttp/httpresponse.h b/indra/llcorehttp/httpresponse.h
index b834085e5c..ef98fbef2b 100644
--- a/indra/llcorehttp/httpresponse.h
+++ b/indra/llcorehttp/httpresponse.h
@@ -72,7 +72,7 @@ public:
/// Statistics for the HTTP
struct TransferStats
{
- typedef boost::shared_ptr ptr_t;
+ typedef std::shared_ptr ptr_t;
TransferStats() : mSizeDownload(0.0), mTotalTime(0.0), mSpeedDownload(0.0) {}
F64 mSizeDownload;
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp
index c95db90340..e21045f3b7 100644
--- a/indra/llfilesystem/lldir.cpp
+++ b/indra/llfilesystem/lldir.cpp
@@ -44,7 +44,6 @@
#include "stringize.h"
#include "llstring.h"
#include
-#include
#include
#include
#include
@@ -746,10 +745,10 @@ void LLDir::walkSearchSkinDirs(const std::string& subdir,
const std::string& filename,
const FUNCTION& function) const
{
- BOOST_FOREACH(std::string skindir, mSearchSkinDirs)
+ for (const std::string& skindir : mSearchSkinDirs)
{
std::string subdir_path(add(skindir, subdir));
- BOOST_FOREACH(std::string subsubdir, subsubdirs)
+ for (const std::string& subsubdir : subsubdirs)
{
std::string full_path(add(subdir_path, subsubdir, filename));
@@ -908,7 +907,7 @@ std::vector LLDir::findSkinnedFilenames(const std::string& subdir,
// current language, copy them -- in proper order -- into results.
// Don't drive this by walking the map itself: it matters that we
// generate results in the same order as subsubdirs.
- BOOST_FOREACH(std::string subsubdir, subsubdirs)
+ for (const std::string& subsubdir : subsubdirs)
{
StringMap::const_iterator found(path_for.find(subsubdir));
if (found != path_for.end())
@@ -920,7 +919,7 @@ std::vector LLDir::findSkinnedFilenames(const std::string& subdir,
LL_DEBUGS("LLDir") << empty;
const char* comma = "";
- BOOST_FOREACH(std::string path, results)
+ for (const std::string& path : results)
{
LL_CONT << comma << "'" << path << "'";
comma = ", ";
diff --git a/indra/llfilesystem/tests/lldir_test.cpp b/indra/llfilesystem/tests/lldir_test.cpp
index 3cff622a4b..60265cade6 100644
--- a/indra/llfilesystem/tests/lldir_test.cpp
+++ b/indra/llfilesystem/tests/lldir_test.cpp
@@ -34,7 +34,6 @@
#include "../test/lltut.h"
#include "stringize.h"
-#include
#include
using boost::assign::list_of;
@@ -109,7 +108,7 @@ struct LLDir_Dummy: public LLDir
"install/skins/default/future/somefile.txt"
};
- BOOST_FOREACH(const char* path, preload)
+ for (const char* path : preload)
{
buildFilesystem(path);
}
@@ -166,7 +165,7 @@ struct LLDir_Dummy: public LLDir
LLStringUtil::getTokens(path, components, "/");
// Ensure we have an entry representing every level of this path
std::string partial;
- BOOST_FOREACH(std::string component, components)
+ for (std::string component : components)
{
append(partial, component);
mFilesystem.insert(partial);
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp
index c8c1d2a3a7..0e804774be 100644
--- a/indra/llimage/llimage.cpp
+++ b/indra/llimage/llimage.cpp
@@ -2384,9 +2384,9 @@ bool LLImageFormatted::save(const std::string &filename)
return false;
}
- outfile.write(getData(), getDataSize());
+ S32 result = outfile.write(getData(), getDataSize());
outfile.close() ;
- return true;
+ return (result != 0);
}
S8 LLImageFormatted::getCodec() const
diff --git a/indra/llimage/llimagej2c.cpp b/indra/llimage/llimagej2c.cpp
index c54a4699ba..64e368a152 100644
--- a/indra/llimage/llimagej2c.cpp
+++ b/indra/llimage/llimagej2c.cpp
@@ -48,7 +48,7 @@ std::string LLImageJ2C::getEngineInfo()
{
// All known LLImageJ2CImpl implementation subclasses are cheap to
// construct.
- boost::scoped_ptr impl(fallbackCreateLLImageJ2CImpl());
+ std::unique_ptr impl(fallbackCreateLLImageJ2CImpl());
return impl->getEngineInfo();
}
diff --git a/indra/llimage/llimagej2c.h b/indra/llimage/llimagej2c.h
index e196f7479e..b30df6f776 100644
--- a/indra/llimage/llimagej2c.h
+++ b/indra/llimage/llimagej2c.h
@@ -95,7 +95,7 @@ protected:
S8 mRawDiscardLevel;
F32 mRate;
bool mReversible;
- boost::scoped_ptr mImpl;
+ std::unique_ptr mImpl;
std::string mLastError;
// Image compression/decompression tester
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 8b39d52b6a..ee33881839 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -32,6 +32,7 @@
#include "llinventorydefines.h"
#include "llxorcipher.h"
#include "llsd.h"
+#include "llsdserialize.h"
#include "message.h"
#include
@@ -217,7 +218,19 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
}
else if (0 == strcmp("metadata", keyword))
{
- LLSD metadata(valuestr);
+ LLSD metadata;
+ if (strncmp("", valuestr, 6) == 0)
+ {
+ std::istringstream stream(valuestr);
+ LLSDSerialize::fromXML(metadata, stream);
+ }
+ else
+ {
+ // next line likely contains metadata, but at the moment is not supported
+ // can do something like:
+ // LLSDSerialize::fromNotation(metadata, input_stream, -1);
+ }
+
if (metadata.has("thumbnail"))
{
const LLSD& thumbnail = metadata["thumbnail"];
@@ -771,7 +784,19 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
}
else if (0 == strcmp("metadata", keyword))
{
- LLSD metadata(valuestr);
+ LLSD metadata;
+ if (strncmp("", valuestr, 6) == 0)
+ {
+ std::istringstream stream(valuestr);
+ LLSDSerialize::fromXML(metadata, stream);
+ }
+ else
+ {
+ // next line likely contains metadata, but at the moment is not supported
+ // can do something like:
+ // LLSDSerialize::fromNotation(metadata, input_stream, -1);
+ }
+
if (metadata.has("thumbnail"))
{
const LLSD& thumbnail = metadata["thumbnail"];
@@ -880,9 +905,14 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
if (mThumbnailUUID.notNull())
{
+ // Max length is 255 chars, will have to export differently if it gets more data
+ // Ex: use newline and toNotation (uses {}) for unlimited size
LLSD metadata;
metadata["thumbnail"] = LLSD().with("asset_id", mThumbnailUUID);
- output_stream << "\t\tmetadata\t" << metadata << "|\n";
+
+ output_stream << "\t\tmetadata\t";
+ LLSDSerialize::toXML(metadata, output_stream);
+ output_stream << "|\n";
}
// Check for permissions to see the asset id, and if so write it
@@ -1381,7 +1411,19 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
}
else if (0 == strcmp("metadata", keyword))
{
- LLSD metadata(valuestr);
+ LLSD metadata;
+ if (strncmp("", valuestr, 6) == 0)
+ {
+ std::istringstream stream(valuestr);
+ LLSDSerialize::fromXML(metadata, stream);
+ }
+ else
+ {
+ // next line likely contains metadata, but at the moment is not supported
+ // can do something like:
+ // LLSDSerialize::fromNotation(metadata, input_stream, -1);
+ }
+
if (metadata.has("thumbnail"))
{
const LLSD& thumbnail = metadata["thumbnail"];
@@ -1421,9 +1463,12 @@ BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL)
output_stream << "\t\tname\t" << mName.c_str() << "|\n";
if (mThumbnailUUID.notNull())
{
+ // Only up to 255 chars
LLSD metadata;
metadata["thumbnail"] = LLSD().with("asset_id", mThumbnailUUID);
- output_stream << "\t\tmetadata\t" << metadata << "|\n";
+ output_stream << "\t\tmetadata\t";
+ LLSDSerialize::toXML(metadata, output_stream);
+ output_stream << "|\n";
}
output_stream << "\t}\n";
return TRUE;
diff --git a/indra/llkdu/llimagej2ckdu.h b/indra/llkdu/llimagej2ckdu.h
index fae69c1e92..096310c017 100644
--- a/indra/llkdu/llimagej2ckdu.h
+++ b/indra/llkdu/llimagej2ckdu.h
@@ -116,10 +116,10 @@ private:
};
// Encode variable
- boost::scoped_ptr mInputp;
+ std::unique_ptr mInputp;
CodeStreamHolder mCodeStreamp;
- boost::scoped_ptr mTPosp; // tile position
- boost::scoped_ptr mTileIndicesp;
+ std::unique_ptr mTPosp; // tile position
+ std::unique_ptr mTileIndicesp;
int mBlocksSize;
int mPrecinctsSize;
int mLevels;
@@ -128,7 +128,7 @@ private:
// We don't own this LLImageRaw. We're simply pointing to an instance
// passed into initDecode().
LLImageRaw *mRawImagep;
- boost::scoped_ptr mDecodeState;
+ std::unique_ptr mDecodeState;
};
#endif
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 3f023fbfab..202080881f 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -1004,7 +1004,7 @@ class LLVolume : public LLRefCount
friend class LLVolumeLODGroup;
protected:
- ~LLVolume(); // use unref
+ virtual ~LLVolume(); // use unref
public:
typedef std::vector face_list_t;
diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp
index 2bf65cdf25..f261357c1d 100644
--- a/indra/llmessage/llcoproceduremanager.cpp
+++ b/indra/llmessage/llcoproceduremanager.cpp
@@ -95,7 +95,7 @@ public:
private:
struct QueuedCoproc
{
- typedef boost::shared_ptr ptr_t;
+ typedef std::shared_ptr ptr_t;
QueuedCoproc(const std::string &name, const LLUUID &id, CoProcedure_t proc) :
mName(name),
@@ -115,7 +115,7 @@ private:
// Use shared_ptr to control the lifespan of our CoprocQueue_t instance
// because the consuming coroutine might outlive this LLCoprocedurePool
// instance.
- typedef boost::shared_ptr CoprocQueuePtr;
+ typedef std::shared_ptr CoprocQueuePtr;
std::string mPoolName;
size_t mPoolSize, mActiveCoprocsCount, mPending;
@@ -301,7 +301,7 @@ LLCoprocedurePool::LLCoprocedurePool(const std::string &poolName, size_t size):
mPoolSize(size),
mActiveCoprocsCount(0),
mPending(0),
- mPendingCoprocs(boost::make_shared(LLCoprocedureManager::DEFAULT_QUEUE_SIZE)),
+ mPendingCoprocs(std::make_shared(LLCoprocedureManager::DEFAULT_QUEUE_SIZE)),
mHTTPPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mCoroMapping()
{
@@ -384,7 +384,7 @@ LLUUID LLCoprocedurePool::enqueueCoprocedure(const std::string &name, LLCoproced
LL_DEBUGS("CoProcMgr") << "Coprocedure(" << name << ") enqueuing with id=" << id.asString() << " in pool \"" << mPoolName << "\" at "
<< mPending << LL_ENDL;
}
- auto pushed = mPendingCoprocs->try_push(boost::make_shared(name, id, proc));
+ auto pushed = mPendingCoprocs->try_push(std::make_shared(name, id, proc));
if (pushed == boost::fibers::channel_op_status::success)
{
++mPending;
diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h
index 6d0d68cf24..fc561c6b0f 100644
--- a/indra/llmessage/llcorehttputil.h
+++ b/indra/llmessage/llcorehttputil.h
@@ -263,8 +263,8 @@ class HttpCoroHandler : public LLCore::HttpHandler
{
public:
- typedef boost::shared_ptr ptr_t;
- typedef boost::weak_ptr wptr_t;
+ typedef std::shared_ptr ptr_t;
+ typedef std::weak_ptr wptr_t;
HttpCoroHandler(LLEventStream &reply);
@@ -317,8 +317,8 @@ public:
static const std::string HTTP_RESULTS_CONTENT;
static const std::string HTTP_RESULTS_RAW;
- typedef boost::shared_ptr ptr_t;
- typedef boost::weak_ptr wptr_t;
+ typedef std::shared_ptr ptr_t;
+ typedef std::weak_ptr wptr_t;
HttpCoroutineAdapter(const std::string &name, LLCore::HttpRequest::policy_t policyId);
~HttpCoroutineAdapter();
diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp
index 9f7768f78e..b7013dbb6e 100644
--- a/indra/llmessage/lldatapacker.cpp
+++ b/indra/llmessage/lldatapacker.cpp
@@ -298,6 +298,13 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char
}
htolememcpy(&size, mCurBufferp, MVT_S32, 4);
+
+ if (size < 0)
+ {
+ LL_WARNS() << "LLDataPackerBinaryBuffer::unpackBinaryData unpacked invalid size, aborting!" << LL_ENDL;
+ return FALSE;
+ }
+
mCurBufferp += 4;
if (!verifyLength(size, name))
diff --git a/indra/llmessage/llexperiencecache.h b/indra/llmessage/llexperiencecache.h
index 8be4c64dfc..3ee45da2e7 100644
--- a/indra/llmessage/llexperiencecache.h
+++ b/indra/llmessage/llexperiencecache.h
@@ -112,7 +112,7 @@ private:
// Callback types for get()
typedef boost::signals2::signal < void(const LLSD &) > callback_signal_t;
- typedef boost::shared_ptr signal_ptr;
+ typedef std::shared_ptr signal_ptr;
// May have multiple callbacks for a single ID, which are
// represented as multiple slots bound to the signal.
// Avoid copying signals via pointers.
diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp
index c707c7ad09..e302dd2b5e 100644
--- a/indra/llmessage/lliohttpserver.cpp
+++ b/indra/llmessage/lliohttpserver.cpp
@@ -982,7 +982,7 @@ LLHTTPNode& LLIOHTTPServer::create(
}
LLHTTPResponseFactory* factory = new LLHTTPResponseFactory;
- boost::shared_ptr factory_ptr(factory);
+ std::shared_ptr factory_ptr(factory);
LLIOServerSocket* server = new LLIOServerSocket(pool, socket, factory_ptr);
diff --git a/indra/llmessage/lliopipe.h b/indra/llmessage/lliopipe.h
index 7fd4cee8ba..e6ac8ebfc2 100644
--- a/indra/llmessage/lliopipe.h
+++ b/indra/llmessage/lliopipe.h
@@ -89,7 +89,7 @@ public:
/**
* @brief Scattered memory container.
*/
- typedef boost::shared_ptr buffer_ptr_t;
+ typedef std::shared_ptr buffer_ptr_t;
/**
* @brief Enumeration for IO return codes
diff --git a/indra/llmessage/lliosocket.h b/indra/llmessage/lliosocket.h
index 303d80eb14..a62b3c0204 100644
--- a/indra/llmessage/lliosocket.h
+++ b/indra/llmessage/lliosocket.h
@@ -65,7 +65,7 @@ public:
/**
* @brief Reference counted shared pointers to sockets.
*/
- typedef boost::shared_ptr ptr_t;
+ typedef std::shared_ptr ptr_t;
/**
* @brief Type of socket to create.
@@ -305,7 +305,7 @@ class LLIOServerSocket : public LLIOPipe
{
public:
typedef LLSocket::ptr_t socket_t;
- typedef boost::shared_ptr factory_t;
+ typedef std::shared_ptr factory_t;
LLIOServerSocket(apr_pool_t* pool, socket_t listener, factory_t reactor);
virtual ~LLIOServerSocket();
diff --git a/indra/llmessage/llservice.h b/indra/llmessage/llservice.h
index 9c09aeb44c..f215acab56 100644
--- a/indra/llmessage/llservice.h
+++ b/indra/llmessage/llservice.h
@@ -116,7 +116,7 @@ class LLService : public LLIOPipe
public:
//typedef boost::intrusive_ptr creator_t;
//typedef boost::intrusive_ptr service_t;
- typedef boost::shared_ptr creator_t;
+ typedef std::shared_ptr