Skip to content

Commit a7754f8

Browse files
Merge branch 'develop' into feat/doctest-poc-clean
2 parents 3548f4c + 416ab83 commit a7754f8

File tree

273 files changed

+866
-2144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+866
-2144
lines changed

indra/llcharacter/llmotion.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ LLMotion::LLMotion( const LLUUID &id ) :
5151
mSendStopTimestamp(F32_MAX),
5252
mResidualWeight(0.f),
5353
mFadeWeight(1.f),
54-
mDeactivateCallback(NULL),
55-
mDeactivateCallbackUserData(NULL)
54+
mDeactivateCallback(nullptr),
55+
mDeactivateCallbackUserData(nullptr)
5656
{
5757
for (S32 i=0; i<3; ++i)
5858
memset(&mJointSignature[i][0], 0, sizeof(U8) * LL_CHARACTER_MAX_ANIMATED_JOINTS);

indra/llcharacter/llmultigesture.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ class LLMultiGesture
5454
void reset();
5555

5656
const std::string& getTrigger() const { return mTrigger; }
57-
protected:
58-
LLMultiGesture(const LLMultiGesture& gest);
59-
const LLMultiGesture& operator=(const LLMultiGesture& rhs);
6057

61-
public:
58+
LLMultiGesture(const LLMultiGesture& gest) = delete;
59+
const LLMultiGesture& operator=(const LLMultiGesture& rhs) = delete;
60+
6261
KEY mKey { 0 };
6362
MASK mMask { 0 };
6463

indra/llcharacter/llvisualparam.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
#include "v3math.h"
3131
#include "llstring.h"
3232
#include "llxmltree.h"
33-
#include <boost/function.hpp>
33+
34+
#include <functional>
3435

3536
class LLPolyMesh;
3637
class LLXmlTreeNode;
@@ -104,7 +105,7 @@ LL_ALIGN_PREFIX(16)
104105
class LLVisualParam
105106
{
106107
public:
107-
typedef boost::function<LLVisualParam*(S32)> visual_param_mapper;
108+
typedef std::function<LLVisualParam*(S32)> visual_param_mapper;
108109

109110
LLVisualParam();
110111
virtual ~LLVisualParam();

indra/llcommon/llapr.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include <sys/param.h> // Need PATH_MAX in APR headers...
3434
#endif
3535

36-
#include <boost/noncopyable.hpp>
3736
#include "llwin32headers.h"
3837
#include "apr_thread_proc.h"
3938
#include "apr_getopt.h"
@@ -145,17 +144,20 @@ class LL_COMMON_API LLVolatileAPRPool : public LLAPRPool
145144
// 2, a global pool.
146145
//
147146

148-
class LL_COMMON_API LLAPRFile : boost::noncopyable
147+
class LL_COMMON_API LLAPRFile
149148
{
150149
// make this non copyable since a copy closes the file
151150
private:
152151
apr_file_t* mFile ;
153152
LLVolatileAPRPool *mCurrentFilePoolp ; //currently in use apr_pool, could be one of them: sAPRFilePoolp, or a temp pool.
154153

155154
public:
156-
LLAPRFile() ;
155+
LLAPRFile();
157156
LLAPRFile(const std::string& filename, apr_int32_t flags, LLVolatileAPRPool* pool = NULL);
158-
~LLAPRFile() ;
157+
~LLAPRFile();
158+
159+
LLAPRFile(const LLAPRFile&) = delete;
160+
LLAPRFile& operator=(const LLAPRFile&) = delete;
159161

160162
apr_status_t open(const std::string& filename, apr_int32_t flags, LLVolatileAPRPool* pool = NULL, S32* sizep = NULL);
161163
apr_status_t open(const std::string& filename, apr_int32_t flags, bool use_global_pool); //use gAPRPoolp.

indra/llcommon/llcallbacklist.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
#ifndef LL_LLCALLBACKLIST_H
2828
#define LL_LLCALLBACKLIST_H
2929

30-
#include "llstl.h"
31-
#include <boost/function.hpp>
30+
#include "stdtypes.h"
31+
32+
#include <functional>
3233
#include <list>
3334

3435
class LLCallbackList
@@ -59,8 +60,8 @@ class LLCallbackList
5960
callback_list_t mCallbackList;
6061
};
6162

62-
typedef boost::function<void ()> nullary_func_t;
63-
typedef boost::function<bool ()> bool_func_t;
63+
typedef std::function<void ()> nullary_func_t;
64+
typedef std::function<bool ()> bool_func_t;
6465

6566
// Call a given callable once in idle loop.
6667
void doOnIdleOneTime(nullary_func_t callable);

indra/llcommon/llcoros.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include "mutex.h"
3838
#include "llsingleton.h"
3939
#include "llinstancetracker.h"
40-
#include <boost/function.hpp>
40+
#include <functional>
4141
#include <string>
4242
#include <exception>
4343
#include <queue>
@@ -112,7 +112,7 @@ class LL_COMMON_API LLCoros: public LLSingleton<LLCoros>
112112
/// stuck with the term "coroutine."
113113
typedef boost::fibers::fiber coro;
114114
/// Canonical callable type
115-
typedef boost::function<void()> callable_t;
115+
typedef std::function<void()> callable_t;
116116

117117
/**
118118
* Create and start running a new coroutine with specified name. The name

indra/llcommon/lldeadmantimer.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,10 @@ class LL_COMMON_API LLDeadmanTimer
9999
/// during updates. If false, cpu usage data isn't
100100
/// collected and will be zero if queried.
101101
LLDeadmanTimer(F64 horizon, bool inc_cpu);
102+
~LLDeadmanTimer() = default;
102103

103-
~LLDeadmanTimer()
104-
{}
105-
106-
private:
107-
LLDeadmanTimer(const LLDeadmanTimer &); // Not defined
108-
void operator=(const LLDeadmanTimer &); // Not defined
104+
LLDeadmanTimer(const LLDeadmanTimer &) = delete;
105+
LLDeadmanTimer& operator=(const LLDeadmanTimer&) = delete;
109106

110107
public:
111108
/// Get the current time. Zero-basis for this time

indra/llcommon/lldependencies.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#if ! defined(LL_LLDEPENDENCIES_H)
3131
#define LL_LLDEPENDENCIES_H
3232

33+
#include <functional>
3334
#include <string>
3435
#include <vector>
3536
#include <set>
@@ -38,7 +39,6 @@
3839
#include <boost/iterator/transform_iterator.hpp>
3940
#include <boost/iterator/indirect_iterator.hpp>
4041
#include <boost/range/iterator_range.hpp>
41-
#include <boost/function.hpp>
4242
#include <boost/bind.hpp>
4343
#include "llexception.h"
4444

@@ -217,7 +217,7 @@ class LLDependencies: public LLDependenciesBase
217217
/// We have various ways to get the dependencies for a given DepNode.
218218
/// Rather than having to restate each one for 'after' and 'before'
219219
/// separately, pass a dep_selector so we can apply each to either.
220-
typedef boost::function<const typename DepNode::dep_set&(const DepNode&)> dep_selector;
220+
typedef std::function<const typename DepNode::dep_set&(const DepNode&)> dep_selector;
221221

222222
public:
223223
LLDependencies() {}
@@ -340,7 +340,7 @@ class LLDependencies: public LLDependenciesBase
340340

341341
public:
342342
/// iterator over value_type entries
343-
typedef boost::transform_iterator<boost::function<value_type(DepNodeMapEntry&)>,
343+
typedef boost::transform_iterator<std::function<value_type(DepNodeMapEntry&)>,
344344
typename DepNodeMap::iterator> iterator;
345345
/// range over value_type entries
346346
typedef boost::iterator_range<iterator> range;
@@ -352,7 +352,7 @@ class LLDependencies: public LLDependenciesBase
352352
}
353353

354354
/// iterator over const_value_type entries
355-
typedef boost::transform_iterator<boost::function<const_value_type(const DepNodeMapEntry&)>,
355+
typedef boost::transform_iterator<std::function<const_value_type(const DepNodeMapEntry&)>,
356356
typename DepNodeMap::const_iterator> const_iterator;
357357
/// range over const_value_type entries
358358
typedef boost::iterator_range<const_iterator> const_range;
@@ -364,7 +364,7 @@ class LLDependencies: public LLDependenciesBase
364364
}
365365

366366
/// iterator over stored NODEs
367-
typedef boost::transform_iterator<boost::function<NODE&(DepNodeMapEntry&)>,
367+
typedef boost::transform_iterator<std::function<NODE&(DepNodeMapEntry&)>,
368368
typename DepNodeMap::iterator> node_iterator;
369369
/// range over stored NODEs
370370
typedef boost::iterator_range<node_iterator> node_range;
@@ -380,7 +380,7 @@ class LLDependencies: public LLDependenciesBase
380380
}
381381

382382
/// const iterator over stored NODEs
383-
typedef boost::transform_iterator<boost::function<const NODE&(const DepNodeMapEntry&)>,
383+
typedef boost::transform_iterator<std::function<const NODE&(const DepNodeMapEntry&)>,
384384
typename DepNodeMap::const_iterator> const_node_iterator;
385385
/// const range over stored NODEs
386386
typedef boost::iterator_range<const_node_iterator> const_node_range;
@@ -396,7 +396,7 @@ class LLDependencies: public LLDependenciesBase
396396
}
397397

398398
/// const iterator over stored KEYs
399-
typedef boost::transform_iterator<boost::function<const KEY&(const DepNodeMapEntry&)>,
399+
typedef boost::transform_iterator<std::function<const KEY&(const DepNodeMapEntry&)>,
400400
typename DepNodeMap::const_iterator> const_key_iterator;
401401
/// const range over stored KEYs
402402
typedef boost::iterator_range<const_key_iterator> const_key_range;

indra/llcommon/lldoubledispatch.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
#define LL_LLDOUBLEDISPATCH_H
3131

3232
#include <list>
33-
#include <boost/function.hpp>
34-
#include <boost/bind.hpp>
35-
#include <boost/ref.hpp>
33+
#include <functional>
3634

3735
/**
3836
* This class supports function calls which are virtual on the dynamic type of
@@ -156,9 +154,9 @@ class LLDoubleDispatch
156154
insert(t1, t2, func);
157155
if (symmetrical)
158156
{
159-
// Use boost::bind() to construct a param-swapping thunk. Don't
157+
// Use std::bind() to construct a param-swapping thunk. Don't
160158
// forget to reverse the parameters too.
161-
insert(t2, t1, boost::bind(func, _2, _1));
159+
insert(t2, t1, std::bind(func, std::placeholders::_2, std::placeholders::_1));
162160
}
163161
}
164162

@@ -193,7 +191,7 @@ class LLDoubleDispatch
193191
insert(Type<Type1>(), Type<Type2>(), func, insertion);
194192
if (symmetrical)
195193
{
196-
insert(Type<Type2>(), Type<Type1>(), boost::bind(func, _2, _1), insertion);
194+
insert(Type<Type2>(), Type<Type1>(), std::bind(func, std::placeholders::_2, std::placeholders::_1), insertion);
197195
}
198196
}
199197

@@ -271,8 +269,8 @@ class LLDoubleDispatch
271269
typename DispatchTable::iterator find(const ParamBaseType& param1, const ParamBaseType& param2)
272270
{
273271
return std::find_if(mDispatch.begin(), mDispatch.end(),
274-
boost::bind(&EntryBase::matches, _1,
275-
boost::ref(param1), boost::ref(param2)));
272+
std::bind(&EntryBase::matches, std::placeholders::_1,
273+
std::ref(param1), std::ref(param2)));
276274
}
277275

278276
/// Look up the first matching entry.

indra/llcommon/llerror.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,8 @@ namespace
527527
mFileLevelMap(),
528528
mTagLevelMap(),
529529
mUniqueLogMessages(),
530-
mCrashFunction(NULL),
531-
mTimeFunction(NULL),
530+
mCrashFunction(nullptr),
531+
mTimeFunction(nullptr),
532532
mRecorders(),
533533
mShouldLogCallCounter(0)
534534
{
@@ -1231,7 +1231,7 @@ namespace
12311231

12321232
std::ostringstream message_stream;
12331233

1234-
if (r->wantsTime() && s->mTimeFunction != NULL)
1234+
if (r->wantsTime() && s->mTimeFunction != nullptr)
12351235
{
12361236
message_stream << s->mTimeFunction();
12371237
}

0 commit comments

Comments
 (0)