diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-24 14:24:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-25 08:25:09 +0200 |
commit | a78182a993288680b04d1329536af5953e8ca31c (patch) | |
tree | 7684e9845b142adbc58cc5bf63003aad7c597593 /registry | |
parent | fa452b54a5d2b31d5bc57617323f0f1092d0794f (diff) |
loplugin:unusedfields in include/package,include/registry
Change-Id: Iadba30885ba3bab7aaee58e298a9dc6b22c8b977
Diffstat (limited to 'registry')
-rw-r--r-- | registry/source/registry.cxx | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx index b18fa570badb..fed98584c645 100644 --- a/registry/source/registry.cxx +++ b/registry/source/registry.cxx @@ -236,97 +236,6 @@ static RegError REGISTRY_CALLTYPE destroyRegistry(RegHandle hReg, -// loadRegKey - -static RegError REGISTRY_CALLTYPE loadKey(RegHandle hReg, - RegKeyHandle hKey, - rtl_uString* keyName, - rtl_uString* regFileName) -{ - - ORegistry* pReg = static_cast< ORegistry* >(hReg); - if (!pReg) - return RegError::INVALID_REGISTRY; - - if (!pReg->isOpen()) - return RegError::REGISTRY_NOT_OPEN; - - ORegKey* pKey = static_cast< ORegKey* >(hKey); - if (!pKey) - return RegError::INVALID_KEY; - - if (pKey->getRegistry() != pReg) - return RegError::INVALID_KEY; - if (pKey->isDeleted()) - return RegError::INVALID_KEY; - if (pKey->isReadOnly()) - return RegError::REGISTRY_READONLY; - - - ORegKey* pNewKey = nullptr; - RegError _ret = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pNewKey)); - if (_ret == RegError::NO_ERROR) - { - pKey->releaseKey(pNewKey); - pKey->deleteKey(keyName); - } - - _ret = pKey->createKey(keyName, reinterpret_cast<RegKeyHandle*>(&pNewKey)); - if (_ret != RegError::NO_ERROR) - return _ret; - - _ret = pReg->loadKey(pNewKey, regFileName); - if (_ret != RegError::NO_ERROR) - { - pKey->releaseKey(pNewKey); - pKey->deleteKey(keyName); - return _ret; - } - - return pKey->closeKey(pNewKey); -} - - -// saveKey - -static RegError REGISTRY_CALLTYPE saveKey(RegHandle hReg, - RegKeyHandle hKey, - rtl_uString* keyName, - rtl_uString* regFileName) -{ - - ORegistry* pReg = static_cast< ORegistry* >(hReg); - if (!pReg) - return RegError::INVALID_REGISTRY; - - if (!pReg->isOpen()) - return RegError::REGISTRY_NOT_OPEN; - - ORegKey* pKey = static_cast< ORegKey* >(hKey); - if (!pKey) - return RegError::INVALID_KEY; - - if (pKey->getRegistry() != pReg) - return RegError::INVALID_KEY; - if (pKey->isDeleted()) - return RegError::INVALID_KEY; - - ORegKey* pNewKey = nullptr; - RegError _ret = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pNewKey)); - if (_ret != RegError::NO_ERROR) - return _ret; - - _ret = pReg->saveKey(pNewKey, regFileName); - if (_ret != RegError::NO_ERROR) - { - (void) pKey->releaseKey(pNewKey); - return _ret; - } - - return pKey->releaseKey(pNewKey); -} - - // mergeKey static RegError REGISTRY_CALLTYPE mergeKey(RegHandle hReg, @@ -412,10 +321,7 @@ Registry_Api* REGISTRY_CALLTYPE initRegistry_Api() &openRegistry, &closeRegistry, &destroyRegistry, - &loadKey, - &saveKey, &mergeKey, - &dumpRegistry, &acquireKey, &releaseKey, &isKeyReadOnly, |