From 164fecadfde2569cb5324017d9bf22e2963008b3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 27 May 2021 19:53:24 +0200 Subject: no need to allocate these on the heap Change-Id: Ic1a1577ed837d3fa2b7b99474f4cee30300628f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116290 Tested-by: Jenkins Reviewed-by: Noel Grandin --- registry/source/regimpl.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'registry') 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; } -- cgit