Kaydet (Commit) d4fce35d authored tarafından Michael Stahl's avatar Michael Stahl

svl: convert DBG_ASSERTs in SfxListener

Change-Id: I07776484277769acf37cb11b8b2cff02c4234d5e
üst 570a8cfd
...@@ -17,14 +17,13 @@ ...@@ -17,14 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <svl/lstner.hxx>
#include <tools/debug.hxx>
#include <svl/hint.hxx> #include <svl/hint.hxx>
#include <svl/SfxBroadcaster.hxx> #include <svl/SfxBroadcaster.hxx>
#include <svl/lstner.hxx>
#include <algorithm> #include <algorithm>
#include <cassert>
TYPEINIT0(SfxListener); TYPEINIT0(SfxListener);
...@@ -72,7 +71,7 @@ void SfxListener::StartListening( SfxBroadcaster& rBroadcaster, bool bPreventDup ...@@ -72,7 +71,7 @@ void SfxListener::StartListening( SfxBroadcaster& rBroadcaster, bool bPreventDup
rBroadcaster.AddListener(*this); rBroadcaster.AddListener(*this);
aBCs.push_back( &rBroadcaster ); 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 ...@@ -117,16 +116,10 @@ bool SfxListener::IsListening( SfxBroadcaster& rBroadcaster ) const
// base implementation of notification handler // base implementation of notification handler
#ifdef DBG_UTIL
void SfxListener::Notify( SfxBroadcaster& rBroadcaster, const SfxHint& ) void SfxListener::Notify( SfxBroadcaster& rBroadcaster, const SfxHint& )
#else
void SfxListener::Notify( SfxBroadcaster&, const SfxHint& )
#endif
{ {
#ifdef DBG_UTIL (void) rBroadcaster;
DBG_ASSERT(aBCs.end() != std::find(aBCs.begin(), aBCs.end(), &rBroadcaster), assert(IsListening(rBroadcaster));
"notification from unregistered broadcaster" );
#endif
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment