summaryrefslogtreecommitdiff
path: root/framework/source/services
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-28 10:33:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-29 08:51:48 +0200
commit1ffba0e356608fb6dbf568248e2a953b4d7fb5d6 (patch)
tree5da59640441292421f2137bc85ee7291daed137e /framework/source/services
parentce9a41dc387966c74c1af92783a97565b5af3668 (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/services')
-rw-r--r--framework/source/services/substitutepathvars.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 7aea555232a6..4d87d98c3e89 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -478,8 +478,7 @@ OUString SubstitutePathVariables::impl_substituteVariable( const OUString& rText
{
throw NoSuchElementException( "Endless recursion detected. Cannot substitute variables!", static_cast<cppu::OWeakObject *>(this) );
}
- else
- aResult = rText;
+ aResult = rText;
}
else
{
@@ -488,8 +487,7 @@ OUString SubstitutePathVariables::impl_substituteVariable( const OUString& rText
{
throw NoSuchElementException( "Unknown variable found!", static_cast<cppu::OWeakObject *>(this) );
}
- else
- aResult = aWorkText;
+ aResult = aWorkText;
}
}