From ccc55255c57f8449aa46cd8847dbda1ced1e851f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 29 May 2015 16:37:15 -0400 Subject: 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. --- indra/llcommon/llpounceable.h | 3 ++- indra/llcommon/tests/llpounceable_test.cpp | 2 +- 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 #include #include #include @@ -137,7 +138,7 @@ private: // LLPounceable is for an LLPounceable instance on the heap or the stack. // LLPounceable is for a static LLPounceable instance. template -class LLPounceable +class LLPounceable: public boost::noncopyable { private: typedef LLPounceableTraits 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 pounceable = &a; + LLPounceable pounceable(&a); // should be able to pass LLPounceable to function accepting T setter(&aptr, pounceable); ensure_equals("aptr should be &a", aptr, &a); -- cgit v1.2.3