[PATCH 6/6] Remove unnecessary temp variable
Stephan Bergmann
sbergman at redhat.com
Mon Jun 18 05:35:58 PDT 2012
On 06/18/2012 10:01 AM, Brad Sowden wrote:
> diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
> index 04e6e73..9f6d2f2 100644
> --- a/sw/source/ui/docvw/edtwin.cxx
> +++ b/sw/source/ui/docvw/edtwin.cxx
> @@ -4992,12 +4992,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
> rSh.IsCrsrReadonly();
> if(!bIsDocReadOnly)
> {
> - QuickHelpData aTmpQHD;
> if( pQuickHlpData->m_bIsDisplayed )
> - {
> - aTmpQHD.Move( *pQuickHlpData );
> pQuickHlpData->Stop( rSh );
> - }
> +
> String sWord;
> if( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
> {
Merely browsing through this quickly, just a minor nit that keeping {
... } even around a single statement is mostly preferable to removing
the (technically redundant) braces. All too easily, the next maintainer
(or somebody trying to quickly add a SAL_DEBUG locally) will
inadvertently forget to add the braces back when adding a second
statement to the conditional block.
Stephan
More information about the LibreOffice
mailing list