summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-05-29 16:37:15 -0400
committerNat Goodspeed <nat@lindenlab.com>2015-05-29 16:37:15 -0400
commitccc55255c57f8449aa46cd8847dbda1ced1e851f (patch)
tree4c6843f3058e6bb72ca80ab55b0c41e497dd72ca /indra
parenta9650ba22219d91438d91fd9371966f510884cbf (diff)
MAINT-5232: Make LLPounceable noncopyable.
Changing the queue-of-callables implementation to boost::signals2::signal, which is noncopyable, means that LLPounceable itself should be noncopyable.
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llpounceable.h3
-rw-r--r--indra/llcommon/tests/llpounceable_test.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/indra/llcommon/llpounceable.h b/indra/llcommon/llpounceable.h
index 9c8aba2154..77b711bdc6 100644
--- a/indra/llcommon/llpounceable.h
+++ b/indra/llcommon/llpounceable.h
@@ -36,6 +36,7 @@
#define LL_LLPOUNCEABLE_H
#include "llsingleton.h"
+#include <boost/noncopyable.hpp>
#include <boost/call_traits.hpp>
#include <boost/type_traits/remove_pointer.hpp>
#include <boost/utility/value_init.hpp>
@@ -137,7 +138,7 @@ private:
// LLPounceable<T> is for an LLPounceable instance on the heap or the stack.
// LLPounceable<T, LLPounceableStatic> is for a static LLPounceable instance.
template <typename T, class TAG=LLPounceableQueue>
-class LLPounceable
+class LLPounceable: public boost::noncopyable
{
private:
typedef LLPounceableTraits<T, TAG> traits;
diff --git a/indra/llcommon/tests/llpounceable_test.cpp b/indra/llcommon/tests/llpounceable_test.cpp
index 25458865a6..2f4915ce11 100644
--- a/indra/llcommon/tests/llpounceable_test.cpp
+++ b/indra/llcommon/tests/llpounceable_test.cpp
@@ -147,7 +147,7 @@ namespace tut
Data a("a");
// should be able to initialize a pounceable (when its constructor
// runs)
- LLPounceable<Data*> pounceable = &a;
+ LLPounceable<Data*> pounceable(&a);
// should be able to pass LLPounceable<T> to function accepting T
setter(&aptr, pounceable);
ensure_equals("aptr should be &a", aptr, &a);