summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
Diffstat (limited to 'registry')
-rw-r--r--registry/source/regimpl.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 6201a38c7662..5976d0a1a219 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -855,11 +855,11 @@ RegError ORegistry::loadKey(RegKeyHandle hKey, const OUString& regFileName,
{
ORegKey* pKey = static_cast< ORegKey* >(hKey);
- std::unique_ptr< ORegistry > pReg (new ORegistry());
- RegError _ret = pReg->initRegistry(regFileName, RegAccessMode::READONLY);
+ ORegistry aReg;
+ RegError _ret = aReg.initRegistry(regFileName, RegAccessMode::READONLY);
if (_ret != RegError::NO_ERROR)
return _ret;
- ORegKey* pRootKey = pReg->getRootKey();
+ ORegKey* pRootKey = aReg.getRootKey();
REG_GUARD(m_mutex);
@@ -889,7 +889,7 @@ RegError ORegistry::loadKey(RegKeyHandle hKey, const OUString& regFileName,
}
rStoreDir = OStoreDirectory();
- (void) pReg->releaseKey(pRootKey);
+ (void) aReg.releaseKey(pRootKey);
return _ret;
}