diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-05 11:53:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-10 17:11:00 +0100 |
commit | 242320d303d43a34ce2255a07783fbd51e253cd0 (patch) | |
tree | 14bd7757a57784a18d1aa2b731eb71999d14bf94 /stoc | |
parent | 8523fb2b37a2cdd2c3743795bb33cf30a57c5385 (diff) |
new loplugin:reducevarscope
Change-Id: Iefe922c2e0d605114d54673d63eccc5e4abd545d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102143
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/defaultregistry/defaultregistry.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index 92adf4642938..ff4c2483e34b 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -807,13 +807,12 @@ sal_Bool SAL_CALL NestedKeyImpl::createLink( const OUString& aLinkName, const OU throw InvalidRegistryException(); } - OUString linkName; OUString resolvedName; sal_Int32 lastIndex = aLinkName.lastIndexOf('/'); if ( lastIndex > 0 ) { - linkName = aLinkName.copy(0, lastIndex); + OUString linkName = aLinkName.copy(0, lastIndex); resolvedName = computeName(linkName); @@ -862,13 +861,12 @@ void SAL_CALL NestedKeyImpl::deleteLink( const OUString& rLinkName ) throw InvalidRegistryException(); } - OUString linkName; OUString resolvedName; sal_Int32 lastIndex = rLinkName.lastIndexOf('/'); if ( lastIndex > 0 ) { - linkName = rLinkName.copy(0, lastIndex); + OUString linkName = rLinkName.copy(0, lastIndex); resolvedName = computeName(linkName); @@ -905,13 +903,12 @@ OUString SAL_CALL NestedKeyImpl::getLinkTarget( const OUString& rLinkName ) throw InvalidRegistryException(); } - OUString linkName; OUString resolvedName; sal_Int32 lastIndex = rLinkName.lastIndexOf('/'); if ( lastIndex > 0 ) { - linkName = rLinkName.copy(0, lastIndex); + OUString linkName = rLinkName.copy(0, lastIndex); resolvedName = computeName(linkName); |