summaryrefslogtreecommitdiff
path: root/stoc/source/defaultregistry/defaultregistry.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-01-28 16:24:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-01-29 07:11:04 +0100
commit98e60805613ab6ea19c03c34c0f36d00374dab73 (patch)
treefb8249445f7ccb3005b5942e7bb495b671033b8e /stoc/source/defaultregistry/defaultregistry.cxx
parent4cff06065ebfe884d8661b790db76f15203f2549 (diff)
loplugin:flatten in stoc..store
Change-Id: Ib8c86179a3d13852cbb02b389b6103aca5456dba Reviewed-on: https://gerrit.libreoffice.org/67013 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/defaultregistry/defaultregistry.cxx')
-rw-r--r--stoc/source/defaultregistry/defaultregistry.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index 90153bb123e8..a8a8418b80b5 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -188,19 +188,19 @@ NestedKeyImpl::NestedKeyImpl( const OUString& rKeyName,
void NestedKeyImpl::computeChanges()
{
Guard< Mutex > aGuard( m_xRegistry->m_mutex );
- if ( m_state != m_xRegistry->m_state )
- {
- Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
+ if ( m_state == m_xRegistry->m_state )
+ return;
- Reference<XRegistryKey> tmpKey = rootKey->openKey(m_name);
+ Reference<XRegistryKey> rootKey(m_xRegistry->m_localReg->getRootKey());
- if ( tmpKey.is() )
- {
- m_localKey = rootKey->openKey(m_name);
- }
+ Reference<XRegistryKey> tmpKey = rootKey->openKey(m_name);
- m_state = m_xRegistry->m_state;
+ if ( tmpKey.is() )
+ {
+ m_localKey = rootKey->openKey(m_name);
}
+
+ m_state = m_xRegistry->m_state;
}