summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-03-06 08:31:20 +0100
committerLuboš Luňák <l.lunak@collabora.com>2022-03-06 10:54:07 +0100
commit35fad780879f0909187c7fa3cb3345814bdceb8c (patch)
treed01ecd4af509b39b2ab504d6ec6924a99a6dda13 /include/svl
parent143de4b1a9d6c45dce55c6c40061643c965492c6 (diff)
make a bunch of SvtBroadcaster/SvtListeners functions inline
These classes are used extensively during some operations in Calc, and not even LTO can inline these when they end up in different binaries. Change-Id: I5b17a004c6cc039508b76d557d58714c83f237a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131071 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/broadcast.hxx4
-rw-r--r--include/svl/listener.hxx12
2 files changed, 9 insertions, 7 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;