diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2022-01-09 06:51:17 +1100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-06-21 20:22:34 +0200 |
commit | e02a7a55c23d23dd7afa2627a7e10c70e1cba001 (patch) | |
tree | 323d2be964a57cd81c61dd07eae443277f67d476 /registry/source | |
parent | 1dbfc4fdc9710e670e25bff5636e0336efee8a18 (diff) |
registry: remove unnecessary comments
Change-Id: I03b49dcf4bb668b0e4967eb4e88639a5a7e36c8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128174
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'registry/source')
-rw-r--r-- | registry/source/keyimpl.cxx | 57 | ||||
-rw-r--r-- | registry/source/reflread.cxx | 53 | ||||
-rw-r--r-- | registry/source/registry.cxx | 42 | ||||
-rw-r--r-- | registry/source/regkey.cxx | 76 |
4 files changed, 3 insertions, 225 deletions
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx index abf8e0d1ef12..37efeda82ff1 100644 --- a/registry/source/keyimpl.cxx +++ b/registry/source/keyimpl.cxx @@ -34,9 +34,6 @@ using namespace store; namespace { char const VALUE_PREFIX[] = "$VL_"; } - -// ORegKey() - ORegKey::ORegKey(const OUString& keyName, ORegistry* pReg) : m_refCount(1) , m_name(keyName) @@ -46,41 +43,26 @@ ORegKey::ORegKey(const OUString& keyName, ORegistry* pReg) { } - -// ~ORegKey() - ORegKey::~ORegKey() { SAL_WARN_IF(m_refCount != 0, "registry", "registry::ORegKey::dtor(): refcount not zero."); } - -// releaseKey - RegError ORegKey::releaseKey(RegKeyHandle hKey) { return m_pRegistry->releaseKey(hKey); } - -// createKey - RegError ORegKey::createKey(std::u16string_view keyName, RegKeyHandle* phNewKey) { return m_pRegistry->createKey(this, keyName, phNewKey); } - -// openKey - RegError ORegKey::openKey(std::u16string_view keyName, RegKeyHandle* phOpenKey) { return m_pRegistry->openKey(this, keyName, phOpenKey); } - -// openSubKeys - RegError ORegKey::openSubKeys(std::u16string_view keyName, RegKeyHandle** phOpenSubKeys, sal_uInt32* pnSubKeys) { RegError _ret = RegError::NO_ERROR; @@ -139,9 +121,6 @@ RegError ORegKey::openSubKeys(std::u16string_view keyName, RegKeyHandle** phOpen return RegError::NO_ERROR; } - -// getKeyNames - RegError ORegKey::getKeyNames(std::u16string_view keyName, rtl_uString*** pSubKeyNames, sal_uInt32* pnSubKeys) @@ -196,25 +175,16 @@ RegError ORegKey::getKeyNames(std::u16string_view keyName, return RegError::NO_ERROR; } - -// closeKey - RegError ORegKey::closeKey(RegKeyHandle hKey) { return m_pRegistry->closeKey(hKey); } - -// deleteKey - RegError ORegKey::deleteKey(std::u16string_view keyName) { return m_pRegistry->deleteKey(this, keyName); } - -// getValueType - RegError ORegKey::getValueInfo(std::u16string_view valueName, RegValueType* pValueType, sal_uInt32* pValueSize) const { OStoreStream rValue; @@ -267,9 +237,6 @@ RegError ORegKey::getValueInfo(std::u16string_view valueName, RegValueType* pVal return RegError::NO_ERROR; } - -// setValue - RegError ORegKey::setValue(std::u16string_view valueName, RegValueType vType, RegValue value, sal_uInt32 vSize) { OStoreStream rValue; @@ -338,9 +305,6 @@ RegError ORegKey::setValue(std::u16string_view valueName, RegValueType vType, Re return RegError::NO_ERROR; } - -// setLongListValue - RegError ORegKey::setLongListValue(std::u16string_view valueName, sal_Int32 const * pValueList, sal_uInt32 len) { OStoreStream rValue; @@ -393,9 +357,6 @@ RegError ORegKey::setLongListValue(std::u16string_view valueName, sal_Int32 cons return RegError::NO_ERROR; } - -// setStringListValue - RegError ORegKey::setStringListValue( std::u16string_view valueName, char** pValueList, sal_uInt32 len) { @@ -458,9 +419,6 @@ RegError ORegKey::setStringListValue( return RegError::NO_ERROR; } - -// setUnicodeListValue - RegError ORegKey::setUnicodeListValue(std::u16string_view valueName, sal_Unicode** pValueList, sal_uInt32 len) { OStoreStream rValue; @@ -522,9 +480,6 @@ RegError ORegKey::setUnicodeListValue(std::u16string_view valueName, sal_Unicode return RegError::NO_ERROR; } - -// getValue - RegError ORegKey::getValue(std::u16string_view valueName, RegValue value) const { OStoreStream rValue; @@ -601,9 +556,6 @@ RegError ORegKey::getValue(std::u16string_view valueName, RegValue value) const return RegError::NO_ERROR; } - -// getLongListValue - RegError ORegKey::getLongListValue(std::u16string_view valueName, sal_Int32** pValueList, sal_uInt32* pLen) const { OStoreStream rValue; @@ -704,9 +656,6 @@ RegError ORegKey::getLongListValue(std::u16string_view valueName, sal_Int32** pV return RegError::NO_ERROR; } - -// getStringListValue - RegError ORegKey::getStringListValue(std::u16string_view valueName, char*** pValueList, sal_uInt32* pLen) const { OStoreStream rValue; @@ -801,9 +750,6 @@ RegError ORegKey::getStringListValue(std::u16string_view valueName, char*** pVal return RegError::NO_ERROR; } - -// getUnicodeListValue - RegError ORegKey::getUnicodeListValue(std::u16string_view valueName, sal_Unicode*** pValueList, sal_uInt32* pLen) const { OStoreStream rValue; @@ -909,9 +855,6 @@ RegError ORegKey::getResolvedKeyName(std::u16string_view keyName, return RegError::NO_ERROR; } - -// countSubKeys() - sal_uInt32 ORegKey::countSubKeys() { REG_GUARD(m_pRegistry->m_mutex); diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx index f31c6e149cd5..fe223c7b46cb 100644 --- a/registry/source/reflread.cxx +++ b/registry/source/reflread.cxx @@ -44,16 +44,11 @@ const sal_uInt32 magic = 0x12345678; const sal_uInt16 minorVersion = 0x0000; const sal_uInt16 majorVersion = 0x0001; -/************************************************************************** - - class BlopObject - - holds any data in a flat memory buffer - -**************************************************************************/ - namespace { +/** + Holds any data in a flat memory buffer + */ class BlopObject { public: @@ -158,12 +153,6 @@ BlopObject::BlopObject(const sal_uInt8* buffer, sal_uInt32 len) m_pBuffer = buffer; } -/************************************************************************** - - class StringCache - -**************************************************************************/ - namespace { class StringCache @@ -210,12 +199,6 @@ sal_uInt16 StringCache::createString(const sal_uInt8* buffer) return 0; } -/************************************************************************** - - class ConstantPool - -**************************************************************************/ - namespace { class ConstantPool : public BlopObject @@ -530,12 +513,6 @@ const sal_Unicode* ConstantPool::readStringConstant(sal_uInt16 index) const return aString; } -/************************************************************************** - - class FieldList - -**************************************************************************/ - namespace { class FieldList : public BlopObject @@ -717,12 +694,6 @@ const char* FieldList::getFieldFileName(sal_uInt16 index) const return aFileName; } -/************************************************************************** - - class ReferenceList - -**************************************************************************/ - namespace { class ReferenceList : public BlopObject @@ -820,12 +791,6 @@ RTFieldAccess ReferenceList::getReferenceAccess(sal_uInt16 index) const return aAccess; } -/************************************************************************** - - class MethodList - -**************************************************************************/ - namespace { class MethodList : public BlopObject @@ -1085,12 +1050,6 @@ const char* MethodList::getMethodDoku(sal_uInt16 index) const return aDoku; } -/************************************************************************** - - class TypeRegistryEntry - -**************************************************************************/ - namespace { class TypeRegistryEntry: public BlopObject { @@ -1173,12 +1132,6 @@ typereg_Version TypeRegistryEntry::getVersion() const { return static_cast< typereg_Version >(readUINT32(OFFSET_MAGIC) - magic); } -/************************************************************************** - - C-API - -**************************************************************************/ - bool TYPEREG_CALLTYPE typereg_reader_create( void const * buffer, sal_uInt32 length, void ** result) diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx index a58a79c8bb76..c498f113c7c6 100644 --- a/registry/source/registry.cxx +++ b/registry/source/registry.cxx @@ -30,9 +30,6 @@ extern "C" { - -// acquire - static void REGISTRY_CALLTYPE acquire(RegHandle hReg) { ORegistry* pReg = static_cast<ORegistry*>(hReg); @@ -41,9 +38,6 @@ static void REGISTRY_CALLTYPE acquire(RegHandle hReg) pReg->acquire(); } - -// release - static void REGISTRY_CALLTYPE release(RegHandle hReg) { ORegistry* pReg = static_cast<ORegistry*>(hReg); @@ -55,9 +49,6 @@ static void REGISTRY_CALLTYPE release(RegHandle hReg) } } - -// getName - static RegError REGISTRY_CALLTYPE getName(RegHandle hReg, rtl_uString** pName) { if (hReg) @@ -78,9 +69,6 @@ static RegError REGISTRY_CALLTYPE getName(RegHandle hReg, rtl_uString** pName) return RegError::INVALID_REGISTRY; } - -// isReadOnly - static sal_Bool REGISTRY_CALLTYPE isReadOnly(RegHandle hReg) { if (hReg) @@ -89,9 +77,6 @@ static sal_Bool REGISTRY_CALLTYPE isReadOnly(RegHandle hReg) return false; } - -// createRegistry - static RegError REGISTRY_CALLTYPE createRegistry(rtl_uString* registryName, RegHandle* phRegistry) { @@ -110,9 +95,6 @@ static RegError REGISTRY_CALLTYPE createRegistry(rtl_uString* registryName, return RegError::NO_ERROR; } - -// openRootKey - static RegError REGISTRY_CALLTYPE openRootKey(RegHandle hReg, RegKeyHandle* phRootKey) { @@ -134,9 +116,6 @@ static RegError REGISTRY_CALLTYPE openRootKey(RegHandle hReg, return RegError::NO_ERROR; } - -// openRegistry - static RegError REGISTRY_CALLTYPE openRegistry(rtl_uString* registryName, RegHandle* phRegistry, RegAccessMode accessMode) @@ -157,9 +136,6 @@ static RegError REGISTRY_CALLTYPE openRegistry(rtl_uString* registryName, return RegError::NO_ERROR; } - -// closeRegistry - static RegError REGISTRY_CALLTYPE closeRegistry(RegHandle hReg) { if (hReg) @@ -184,9 +160,6 @@ static RegError REGISTRY_CALLTYPE closeRegistry(RegHandle hReg) } } - -// destroyRegistry - static RegError REGISTRY_CALLTYPE destroyRegistry(RegHandle hReg, rtl_uString* registryName) { @@ -235,9 +208,6 @@ static RegError REGISTRY_CALLTYPE dumpRegistry(RegHandle hReg, return pReg->dumpRegistry(hKey); } - -// initRegistry_Api - Registry_Api* REGISTRY_CALLTYPE initRegistry_Api() { static Registry_Api aApi= {&acquire, @@ -278,18 +248,12 @@ Registry_Api* REGISTRY_CALLTYPE initRegistry_Api() } - -// reg_openRootKey - RegError REGISTRY_CALLTYPE reg_openRootKey(RegHandle hRegistry, RegKeyHandle* phRootKey) { return openRootKey(hRegistry, phRootKey); } - -// reg_openRegistry - RegError REGISTRY_CALLTYPE reg_openRegistry(rtl_uString* registryName, RegHandle* phRegistry) { @@ -308,9 +272,6 @@ RegError REGISTRY_CALLTYPE reg_openRegistry(rtl_uString* registryName, return RegError::NO_ERROR; } - -// reg_closeRegistry - RegError REGISTRY_CALLTYPE reg_closeRegistry(RegHandle hRegistry) { if (hRegistry) @@ -324,9 +285,6 @@ RegError REGISTRY_CALLTYPE reg_closeRegistry(RegHandle hRegistry) } } - -// reg_dumpRegistry - RegError REGISTRY_CALLTYPE reg_dumpRegistry(RegKeyHandle hKey) { ORegKey *pKey; diff --git a/registry/source/regkey.cxx b/registry/source/regkey.cxx index 4f0d518976d4..b2eeb63e67a6 100644 --- a/registry/source/regkey.cxx +++ b/registry/source/regkey.cxx @@ -24,9 +24,6 @@ #include "regimpl.hxx" #include "keyimpl.hxx" - -// acquireKey - void REGISTRY_CALLTYPE acquireKey(RegKeyHandle hKey) { ORegKey* pKey = static_cast< ORegKey* >(hKey); @@ -37,9 +34,6 @@ void REGISTRY_CALLTYPE acquireKey(RegKeyHandle hKey) } } - -// releaseKey - void REGISTRY_CALLTYPE releaseKey(RegKeyHandle hKey) { ORegKey* pKey = static_cast< ORegKey* >(hKey); @@ -50,18 +44,12 @@ void REGISTRY_CALLTYPE releaseKey(RegKeyHandle hKey) } } - -// isKeyReadOnly - sal_Bool REGISTRY_CALLTYPE isKeyReadOnly(RegKeyHandle hKey) { ORegKey* pKey = static_cast< ORegKey* >(hKey); return pKey != nullptr && pKey->isReadOnly(); } - -// getKeyName - RegError REGISTRY_CALLTYPE getKeyName(RegKeyHandle hKey, rtl_uString** pKeyName) { ORegKey* pKey = static_cast< ORegKey* >(hKey); @@ -76,9 +64,6 @@ RegError REGISTRY_CALLTYPE getKeyName(RegKeyHandle hKey, rtl_uString** pKeyName) } } - -// createKey - RegError REGISTRY_CALLTYPE createKey(RegKeyHandle hKey, rtl_uString* keyName, RegKeyHandle* phNewKey) @@ -98,9 +83,6 @@ RegError REGISTRY_CALLTYPE createKey(RegKeyHandle hKey, return pKey->createKey(OUString::unacquired(&keyName), phNewKey); } - -// openKey - RegError REGISTRY_CALLTYPE openKey(RegKeyHandle hKey, rtl_uString* keyName, RegKeyHandle* phOpenKey) @@ -117,9 +99,6 @@ RegError REGISTRY_CALLTYPE openKey(RegKeyHandle hKey, return pKey->openKey(OUString::unacquired(&keyName), phOpenKey); } - -// openSubKeys - RegError REGISTRY_CALLTYPE openSubKeys(RegKeyHandle hKey, rtl_uString* keyName, RegKeyHandle** pphSubKeys, @@ -138,9 +117,6 @@ RegError REGISTRY_CALLTYPE openSubKeys(RegKeyHandle hKey, return pKey->openSubKeys(OUString::unacquired(&keyName), pphSubKeys, pnSubKeys); } - -// closeSubKeys - RegError REGISTRY_CALLTYPE closeSubKeys(RegKeyHandle* phSubKeys, sal_uInt32 nSubKeys) { @@ -157,9 +133,6 @@ RegError REGISTRY_CALLTYPE closeSubKeys(RegKeyHandle* phSubKeys, return RegError::NO_ERROR; } - -// deleteKey - RegError REGISTRY_CALLTYPE deleteKey(RegKeyHandle hKey, rtl_uString* keyName) { @@ -176,9 +149,6 @@ RegError REGISTRY_CALLTYPE deleteKey(RegKeyHandle hKey, return pKey->deleteKey(OUString::unacquired(&keyName)); } - -// closeKey - RegError REGISTRY_CALLTYPE closeKey(RegKeyHandle hKey) { ORegKey* pKey = static_cast< ORegKey* >(hKey); @@ -188,9 +158,6 @@ RegError REGISTRY_CALLTYPE closeKey(RegKeyHandle hKey) return pKey->closeKey(hKey); } - -// setValue - RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString* keyName, RegValueType valueType, @@ -231,9 +198,6 @@ RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, return pKey->setValue(valueName, valueType, pData, valueSize); } - -// setLongValueList - RegError REGISTRY_CALLTYPE setLongListValue(RegKeyHandle hKey, rtl_uString* keyName, sal_Int32 const * pValueList, @@ -273,9 +237,6 @@ RegError REGISTRY_CALLTYPE setLongListValue(RegKeyHandle hKey, return pKey->setLongListValue(valueName, pValueList, len); } - -// setStringValueList - RegError REGISTRY_CALLTYPE setStringListValue(RegKeyHandle hKey, rtl_uString* keyName, char** pValueList, @@ -315,9 +276,6 @@ RegError REGISTRY_CALLTYPE setStringListValue(RegKeyHandle hKey, return pKey->setStringListValue(valueName, pValueList, len); } - -// setUnicodeValueList - RegError REGISTRY_CALLTYPE setUnicodeListValue(RegKeyHandle hKey, rtl_uString* keyName, sal_Unicode** pValueList, @@ -357,9 +315,6 @@ RegError REGISTRY_CALLTYPE setUnicodeListValue(RegKeyHandle hKey, return pKey->setUnicodeListValue(valueName, pValueList, len); } - -// getValueInfo - RegError REGISTRY_CALLTYPE getValueInfo(RegKeyHandle hKey, rtl_uString* keyName, RegValueType* pValueType, @@ -410,9 +365,6 @@ RegError REGISTRY_CALLTYPE getValueInfo(RegKeyHandle hKey, return RegError::NO_ERROR; } - -// getValueInfo - RegError REGISTRY_CALLTYPE getValue(RegKeyHandle hKey, rtl_uString* keyName, RegValue pValue) @@ -445,9 +397,6 @@ RegError REGISTRY_CALLTYPE getValue(RegKeyHandle hKey, return pKey->getValue(valueName, pValue); } - -// getLongValueList - RegError REGISTRY_CALLTYPE getLongListValue(RegKeyHandle hKey, rtl_uString* keyName, sal_Int32** pValueList, @@ -485,9 +434,6 @@ RegError REGISTRY_CALLTYPE getLongListValue(RegKeyHandle hKey, return pKey->getLongListValue(valueName, pValueList, pLen); } - -// getStringValueList - RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey, rtl_uString* keyName, char*** pValueList, @@ -525,7 +471,6 @@ RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey, return pKey->getStringListValue(valueName, pValueList, pLen); } -// getUnicodeListValue RegError REGISTRY_CALLTYPE getUnicodeListValue(RegKeyHandle hKey, rtl_uString* keyName, sal_Unicode*** pValueList, @@ -563,9 +508,6 @@ RegError REGISTRY_CALLTYPE getUnicodeListValue(RegKeyHandle hKey, return pKey->getUnicodeListValue(valueName, pValueList, pLen); } - -// freeValueList - RegError REGISTRY_CALLTYPE freeValueList(RegValueType valueType, RegValue pValueList, sal_uInt32 len) @@ -607,9 +549,6 @@ RegError REGISTRY_CALLTYPE freeValueList(RegValueType valueType, return RegError::NO_ERROR; } - -// getName - RegError REGISTRY_CALLTYPE getResolvedKeyName(RegKeyHandle hKey, rtl_uString* keyName, SAL_UNUSED_PARAMETER sal_Bool, @@ -629,9 +568,6 @@ RegError REGISTRY_CALLTYPE getResolvedKeyName(RegKeyHandle hKey, return _ret; } - -// getKeyNames - RegError REGISTRY_CALLTYPE getKeyNames(RegKeyHandle hKey, rtl_uString* keyName, rtl_uString*** pSubKeyNames, @@ -647,9 +583,6 @@ RegError REGISTRY_CALLTYPE getKeyNames(RegKeyHandle hKey, return pKey->getKeyNames(OUString::unacquired(&keyName), pSubKeyNames, pnSubKeys); } - -// freeKeyNames - RegError REGISTRY_CALLTYPE freeKeyNames(rtl_uString** pKeyNames, sal_uInt32 nKeys) { @@ -663,12 +596,6 @@ RegError REGISTRY_CALLTYPE freeKeyNames(rtl_uString** pKeyNames, return RegError::NO_ERROR; } - -// C API - - -// reg_openKey - RegError REGISTRY_CALLTYPE reg_openKey(RegKeyHandle hKey, rtl_uString* keyName, RegKeyHandle* phOpenKey) @@ -679,9 +606,6 @@ RegError REGISTRY_CALLTYPE reg_openKey(RegKeyHandle hKey, return openKey(hKey, keyName, phOpenKey); } - -// reg_closeKey - RegError REGISTRY_CALLTYPE reg_closeKey(RegKeyHandle hKey) { if (!hKey) |