From 0e8a40e8b8c883611b6d34e47dc6e33ba60e0f91 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 15 Oct 2015 12:28:31 +0200 Subject: calling IsSet() before Call() on Link<> is unnecessary the Call() already does a check Found with: git grep -A 1 -w 'IsSet()' | grep -B 1 '.Call(' | grep ':' | cut -d ':' -f 1 Change-Id: Ia7248f5d62640b75f705e539c3d1183e39c0d847 --- sd/source/ui/animations/CustomAnimationCreateDialog.cxx | 3 +-- sd/source/ui/dlg/docprev.cxx | 3 +-- sd/source/ui/tools/SlotStateListener.cxx | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index 1a2e538caac6..ee0435ecf8eb 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -147,8 +147,7 @@ void CategoryListBox::MouseButtonUp( const MouseEvent& rMEvt ) ReleaseMouse(); if( rMEvt.IsLeft() && (rMEvt.GetClicks() == 2) ) { - if( maDoubleClickHdl.IsSet() ) - maDoubleClickHdl.Call( *this ); + maDoubleClickHdl.Call( *this ); } else { diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index 7540fa7a1946..38ded5a9b710 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -203,8 +203,7 @@ bool SdDocPreviewWin::Notify( NotifyEvent& rNEvt ) { if( rNEvt.GetWindow() == this ) { - if(aClickHdl.IsSet()) - aClickHdl.Call(*this); + aClickHdl.Call(*this); } } } diff --git a/sd/source/ui/tools/SlotStateListener.cxx b/sd/source/ui/tools/SlotStateListener.cxx index a3d1be1c462b..c3fc2275fcff 100644 --- a/sd/source/ui/tools/SlotStateListener.cxx +++ b/sd/source/ui/tools/SlotStateListener.cxx @@ -122,8 +122,7 @@ void SlotStateListener::statusChanged ( { ThrowIfDisposed(); OUString sSlotName (rState.FeatureURL.Complete); - if (maCallback.IsSet()) - maCallback.Call(sSlotName); + maCallback.Call(sSlotName); } void SlotStateListener::ReleaseListeners() -- cgit