diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-11-24 12:45:02 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-11-24 13:41:19 +0100 |
commit | d4fce35ddc43b586cdb093244f3a5eae4753b772 (patch) | |
tree | ad3d7fb0e2420d93a328a104b1335ffa1e2f8a5c /svl | |
parent | 570a8cfd7ff33374791af3adfc2be9e666c2506b (diff) |
svl: convert DBG_ASSERTs in SfxListener
Change-Id: I07776484277769acf37cb11b8b2cff02c4234d5e
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/notify/lstner.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/svl/source/notify/lstner.cxx b/svl/source/notify/lstner.cxx index f3daa2427c93..bef588ad1d27 100644 --- a/svl/source/notify/lstner.cxx +++ b/svl/source/notify/lstner.cxx @@ -17,14 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - -#include <tools/debug.hxx> +#include <svl/lstner.hxx> #include <svl/hint.hxx> #include <svl/SfxBroadcaster.hxx> -#include <svl/lstner.hxx> #include <algorithm> +#include <cassert> TYPEINIT0(SfxListener); @@ -72,7 +71,7 @@ void SfxListener::StartListening( SfxBroadcaster& rBroadcaster, bool bPreventDup rBroadcaster.AddListener(*this); aBCs.push_back( &rBroadcaster ); - DBG_ASSERT( IsListening(rBroadcaster), "StartListening failed" ); + assert(IsListening(rBroadcaster) && "StartListening failed"); } } @@ -117,16 +116,10 @@ bool SfxListener::IsListening( SfxBroadcaster& rBroadcaster ) const // base implementation of notification handler -#ifdef DBG_UTIL void SfxListener::Notify( SfxBroadcaster& rBroadcaster, const SfxHint& ) -#else -void SfxListener::Notify( SfxBroadcaster&, const SfxHint& ) -#endif { - #ifdef DBG_UTIL - DBG_ASSERT(aBCs.end() != std::find(aBCs.begin(), aBCs.end(), &rBroadcaster), - "notification from unregistered broadcaster" ); - #endif + (void) rBroadcaster; + assert(IsListening(rBroadcaster)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |