[Libreoffice-commits] core.git: include/svl svl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 10 14:20:06 UTC 2021
include/svl/listener.hxx | 2 +-
svl/source/notify/listener.cxx | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 67cadbe2a9165f99de7d47a861954c6bc6c5f216
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jun 10 11:47:42 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jun 10 16:19:22 2021 +0200
loplugin:unnecessaryreturn SvtListener::EndListening
Change-Id: Ifa7092b31b6027eeb5d7df67ac8b7de9337faf66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116985
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/svl/listener.hxx b/include/svl/listener.hxx
index 38d72552618a..636e69d9cf8b 100644
--- a/include/svl/listener.hxx
+++ b/include/svl/listener.hxx
@@ -52,7 +52,7 @@ public:
virtual ~SvtListener() COVERITY_NOEXCEPT_FALSE;
bool StartListening( SvtBroadcaster& rBroadcaster );
- bool EndListening( SvtBroadcaster& rBroadcaster );
+ void EndListening( SvtBroadcaster& rBroadcaster );
void EndListeningAll();
/// Overwrites existing broadcasters with the ones from the specified listener
diff --git a/svl/source/notify/listener.cxx b/svl/source/notify/listener.cxx
index 51564ce9b4b7..e1226f855f7c 100644
--- a/svl/source/notify/listener.cxx
+++ b/svl/source/notify/listener.cxx
@@ -52,16 +52,15 @@ bool SvtListener::StartListening( SvtBroadcaster& rBroadcaster )
return r.second;
}
-bool SvtListener::EndListening( SvtBroadcaster& rBroadcaster )
+void SvtListener::EndListening( SvtBroadcaster& rBroadcaster )
{
BroadcastersType::const_iterator it = maBroadcasters.find(&rBroadcaster);
if (it == maBroadcasters.end())
// Not listening to this broadcaster.
- return false;
+ return;
rBroadcaster.Remove(this);
maBroadcasters.erase(it);
- return true;
}
// called from the SvtBroadcaster destructor, used to avoid calling
More information about the Libreoffice-commits
mailing list