From d4fce35ddc43b586cdb093244f3a5eae4753b772 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 24 Nov 2014 12:45:02 +0100 Subject: svl: convert DBG_ASSERTs in SfxListener Change-Id: I07776484277769acf37cb11b8b2cff02c4234d5e --- svl/source/notify/lstner.cxx | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'svl/source/notify') 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 +#include #include #include -#include #include +#include 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: */ -- cgit