diff options
-rw-r--r-- | include/svl/broadcast.hxx | 4 | ||||
-rw-r--r-- | include/svl/listener.hxx | 12 | ||||
-rw-r--r-- | svl/source/notify/broadcast.cxx | 8 | ||||
-rw-r--r-- | svl/source/notify/listener.cxx | 18 |
4 files changed, 9 insertions, 33 deletions
diff --git a/include/svl/broadcast.hxx b/include/svl/broadcast.hxx index eaf4de8ba448..3c9f64967909 100644 --- a/include/svl/broadcast.hxx +++ b/include/svl/broadcast.hxx @@ -50,7 +50,9 @@ protected: virtual void ListenersGone(); public: - SvtBroadcaster(); + SvtBroadcaster() + : mnEmptySlots(0), mnListenersFirstUnsorted(0), mbAboutToDie(false) + , mbDisposing(false), mbDestNormalized(true) {} SvtBroadcaster( const SvtBroadcaster &rBC ); virtual ~SvtBroadcaster(); diff --git a/include/svl/listener.hxx b/include/svl/listener.hxx index 636e69d9cf8b..e7c589625304 100644 --- a/include/svl/listener.hxx +++ b/include/svl/listener.hxx @@ -41,14 +41,14 @@ public: { sal_uInt16 mnId; public: - QueryBase( sal_uInt16 nId ); - virtual ~QueryBase(); + QueryBase( sal_uInt16 nId ) : mnId(nId) {} + virtual ~QueryBase() {}; - sal_uInt16 getId() const; + sal_uInt16 getId() const { return mnId; } }; - SvtListener(); - SvtListener( const SvtListener &r ); + SvtListener() = default; + SvtListener( const SvtListener &r ) = default; virtual ~SvtListener() COVERITY_NOEXCEPT_FALSE; bool StartListening( SvtBroadcaster& rBroadcaster ); @@ -57,7 +57,7 @@ public: /// Overwrites existing broadcasters with the ones from the specified listener void CopyAllBroadcasters( const SvtListener& r ); - bool HasBroadcaster() const; + bool HasBroadcaster() const { return !maBroadcasters.empty(); } virtual void Notify( const SfxHint& rHint ); virtual void Query( QueryBase& rQuery ) const; diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx index 54373115c9db..042d1dacaae3 100644 --- a/svl/source/notify/broadcast.cxx +++ b/svl/source/notify/broadcast.cxx @@ -177,14 +177,6 @@ void SvtBroadcaster::Remove( SvtListener* p ) ListenersGone(); } -SvtBroadcaster::SvtBroadcaster() - : mnEmptySlots(0) - , mnListenersFirstUnsorted(0) - , mbAboutToDie(false) - , mbDisposing(false) - , mbDestNormalized(true) -{} - SvtBroadcaster::SvtBroadcaster( const SvtBroadcaster &rBC ) : mnEmptySlots(0), mnListenersFirstUnsorted(0), mbAboutToDie(false), mbDisposing(false), diff --git a/svl/source/notify/listener.cxx b/svl/source/notify/listener.cxx index 172dbdb8b31d..6b1be0ca20b4 100644 --- a/svl/source/notify/listener.cxx +++ b/svl/source/notify/listener.cxx @@ -20,18 +20,6 @@ #include <svl/listener.hxx> #include <svl/broadcast.hxx> -SvtListener::QueryBase::QueryBase( sal_uInt16 nId ) : mnId(nId) {} -SvtListener::QueryBase::~QueryBase() {} - -sal_uInt16 SvtListener::QueryBase::getId() const -{ - return mnId; -} - -SvtListener::SvtListener() {} - -SvtListener::SvtListener( const SvtListener & ) {} - SvtListener::~SvtListener() COVERITY_NOEXCEPT_FALSE { // Unregister itself from all broadcasters it's listening to. @@ -94,14 +82,8 @@ void SvtListener::CopyAllBroadcasters( const SvtListener& r ) } } -bool SvtListener::HasBroadcaster() const -{ - return !maBroadcasters.empty(); -} - void SvtListener::Notify( const SfxHint& /*rHint*/ ) {} void SvtListener::Query( QueryBase& /*rQuery*/ ) const {} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |