diff options
| author | Rye <rye@alchemyviewer.org> | 2025-11-28 13:49:27 -0500 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-11-30 19:22:22 +0200 |
| commit | afb1f4d692bb593b3f200d490dd3f8fdeab8d279 (patch) | |
| tree | 3910d355ec29253ed18761fafdb16e0a99e4e4e7 /indra/llui | |
| parent | b3a1b099aa5ce7c02ccdb0fa5bc3d55ced989e5e (diff) | |
Replace boost noncopyable and undefined function usage with modern c++ deleted operator and constructor
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/llnotifications.h | 12 | ||||
| -rw-r--r-- | indra/llui/llview.h | 7 |
2 files changed, 14 insertions, 5 deletions
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 3c8e1e85fa..637f0bd88d 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -303,7 +303,6 @@ typedef std::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibilityRu * shared pointer. */ class LLNotification : - boost::noncopyable, public std::enable_shared_from_this<LLNotification> { LOG_CLASS(LLNotification); @@ -429,6 +428,10 @@ private: public: LLNotification(const LLSDParamAdapter<Params>& p); + // Non-copyable + LLNotification(const LLNotification&) = delete; + LLNotification& operator=(const LLNotification&) = delete; + void setResponseFunctor(std::string const &responseFunctorName); void setResponseFunctor(const LLNotificationFunctorRegistry::ResponseFunctor& cb); @@ -817,10 +820,9 @@ typedef boost::intrusive_ptr<LLNotificationChannel> LLNotificationChannelPtr; // manages a list of notifications // Note that if this is ever copied around, we might find ourselves with multiple copies // of a queue with notifications being added to different nonequivalent copies. So we -// make it inherit from boost::noncopyable, and then create a map of LLPointer to manage it. +// delete the copy operator and constructor, and then create a map of LLPointer to manage it. // class LLNotificationChannel : - boost::noncopyable, public LLNotificationChannelBase, public LLInstanceTracker<LLNotificationChannel, std::string> { @@ -843,6 +845,10 @@ public: virtual ~LLNotificationChannel(); typedef LLNotificationSet::iterator Iterator; + // Non-copyable + LLNotificationChannel(const LLNotificationChannel&) = delete; + LLNotificationChannel& operator=(const LLNotificationChannel&) = delete; + std::string getName() const { return mName; } typedef std::vector<std::string>::const_iterator parents_iter; boost::iterator_range<parents_iter> getParents() const diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 97212a9d2d..5695776ae6 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -50,7 +50,6 @@ #include <list> #include <boost/function.hpp> -#include <boost/noncopyable.hpp> class LLSD; @@ -637,7 +636,7 @@ public: // LLView::TemporaryDrilldownFunc scoped_func(myfunctor); // // ... test with myfunctor ... // } // exiting block restores original LLView::sDrilldown - class TemporaryDrilldownFunc: public boost::noncopyable + class TemporaryDrilldownFunc { public: TemporaryDrilldownFunc(const DrilldownFunc& func): @@ -651,6 +650,10 @@ public: sDrilldown = mOldDrilldown; } + // Non-copyable + TemporaryDrilldownFunc(const TemporaryDrilldownFunc&) = delete; + TemporaryDrilldownFunc& operator=(const TemporaryDrilldownFunc&) = delete; + private: DrilldownFunc mOldDrilldown; }; |
