From 1ffba0e356608fb6dbf568248e2a953b4d7fb5d6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 28 Sep 2017 10:33:09 +0200 Subject: loplugin:flatten check for throw in then clause also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins Reviewed-by: Noel Grandin --- linguistic/source/convdiclist.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'linguistic/source/convdiclist.cxx') diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 0951d6796ed8..edb5eef7df30 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -433,11 +433,9 @@ uno::Reference< XConversionDictionary > SAL_CALL ConvDicList::addNewDictionary( if (!xRes.is()) throw NoSupportException(); - else - { - xRes->setActive( true ); - GetNameContainer().insertByName( rName, Any(xRes) ); - } + + xRes->setActive( true ); + GetNameContainer().insertByName( rName, Any(xRes) ); return xRes; } -- cgit