diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-28 17:56:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-29 16:42:33 +0100 |
commit | 042033f1e6da22616cb76c8d950c20c9efecbad5 (patch) | |
tree | 26b3f1f42d067506f44550b410f3fb9640616a5b /registry | |
parent | ccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff) |
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'registry')
-rw-r--r-- | registry/source/keyimpl.cxx | 37 | ||||
-rw-r--r-- | registry/source/keyimpl.hxx | 22 |
2 files changed, 32 insertions, 27 deletions
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx index 437aa3114e10..00b227efe986 100644 --- a/registry/source/keyimpl.cxx +++ b/registry/source/keyimpl.cxx @@ -215,7 +215,7 @@ RegError ORegKey::deleteKey(const OUString& keyName) // getValueType -RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueType, sal_uInt32* pValueSize) const +RegError ORegKey::getValueInfo(std::u16string_view valueName, RegValueType* pValueType, sal_uInt32* pValueSize) const { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -226,7 +226,7 @@ RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueTy accessMode = storeAccessMode::ReadOnly; } - OUString sImplValueName = VALUE_PREFIX + valueName; + OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -270,7 +270,7 @@ RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueTy // setValue -RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegValue value, sal_uInt32 vSize) +RegError ORegKey::setValue(std::u16string_view valueName, RegValueType vType, RegValue value, sal_uInt32 vSize) { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -285,7 +285,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal return RegError::INVALID_VALUE; } - OUString sImplValueName = VALUE_PREFIX + valueName; + OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -341,7 +341,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal // setLongListValue -RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32 const * pValueList, sal_uInt32 len) +RegError ORegKey::setLongListValue(std::u16string_view valueName, sal_Int32 const * pValueList, sal_uInt32 len) { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -351,7 +351,7 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32 const * return RegError::REGISTRY_READONLY; } - OUString sImplValueName = VALUE_PREFIX + valueName; + OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -396,7 +396,8 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32 const * // setStringListValue -RegError ORegKey::setStringListValue(const OUString& valueName, char** pValueList, sal_uInt32 len) +RegError ORegKey::setStringListValue( + std::u16string_view valueName, char** pValueList, sal_uInt32 len) { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -406,7 +407,7 @@ RegError ORegKey::setStringListValue(const OUString& valueName, char** pValueLis return RegError::REGISTRY_READONLY; } - OUString sImplValueName = VALUE_PREFIX + valueName; + OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -460,7 +461,7 @@ RegError ORegKey::setStringListValue(const OUString& valueName, char** pValueLis // setUnicodeListValue -RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** pValueList, sal_uInt32 len) +RegError ORegKey::setUnicodeListValue(std::u16string_view valueName, sal_Unicode** pValueList, sal_uInt32 len) { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -470,7 +471,7 @@ RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** p return RegError::REGISTRY_READONLY; } - OUString sImplValueName = VALUE_PREFIX + valueName; + OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -524,7 +525,7 @@ RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** p // getValue -RegError ORegKey::getValue(const OUString& valueName, RegValue value) const +RegError ORegKey::getValue(std::u16string_view valueName, RegValue value) const { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -537,7 +538,7 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const accessMode = storeAccessMode::ReadOnly; } - OUString sImplValueName = VALUE_PREFIX + valueName; + OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -609,7 +610,7 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const // getLongListValue -RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValueList, sal_uInt32* pLen) const +RegError ORegKey::getLongListValue(std::u16string_view valueName, sal_Int32** pValueList, sal_uInt32* pLen) const { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -622,7 +623,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue accessMode = storeAccessMode::ReadOnly; } - OUString sImplValueName = VALUE_PREFIX + valueName; + OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -712,7 +713,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue // getStringListValue -RegError ORegKey::getStringListValue(const OUString& valueName, char*** pValueList, sal_uInt32* pLen) const +RegError ORegKey::getStringListValue(std::u16string_view valueName, char*** pValueList, sal_uInt32* pLen) const { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -725,7 +726,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, char*** pValueLi accessMode = storeAccessMode::ReadOnly; } - OUString sImplValueName = VALUE_PREFIX + valueName; + OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName; REG_GUARD(m_pRegistry->m_mutex); @@ -809,7 +810,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, char*** pValueLi // getUnicodeListValue -RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode*** pValueList, sal_uInt32* pLen) const +RegError ORegKey::getUnicodeListValue(std::u16string_view valueName, sal_Unicode*** pValueList, sal_uInt32* pLen) const { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -822,7 +823,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode*** accessMode = storeAccessMode::ReadOnly; } - OUString sImplValueName = VALUE_PREFIX + valueName; + OUString sImplValueName = OUString::Concat(VALUE_PREFIX) + valueName; REG_GUARD(m_pRegistry->m_mutex); diff --git a/registry/source/keyimpl.hxx b/registry/source/keyimpl.hxx index 3233bcad860a..17b7023dce75 100644 --- a/registry/source/keyimpl.hxx +++ b/registry/source/keyimpl.hxx @@ -20,6 +20,10 @@ #ifndef INCLUDED_REGISTRY_SOURCE_KEYIMPL_HXX #define INCLUDED_REGISTRY_SOURCE_KEYIMPL_HXX +#include <sal/config.h> + +#include <string_view> + #include "regimpl.hxx" #include <rtl/ustring.hxx> @@ -54,38 +58,38 @@ public: RegError deleteKey(const OUString& keyName); - RegError getValueInfo(const OUString& valueName, + RegError getValueInfo(std::u16string_view valueName, RegValueType* pValueTye, sal_uInt32* pValueSize) const; - RegError setValue(const OUString& valueName, + RegError setValue(std::u16string_view valueName, RegValueType vType, RegValue value, sal_uInt32 vSize); - RegError setLongListValue(const OUString& valueName, + RegError setLongListValue(std::u16string_view valueName, sal_Int32 const * pValueList, sal_uInt32 len); - RegError setStringListValue(const OUString& valueName, + RegError setStringListValue(std::u16string_view valueName, char** pValueList, sal_uInt32 len); - RegError setUnicodeListValue(const OUString& valueName, + RegError setUnicodeListValue(std::u16string_view valueName, sal_Unicode** pValueList, sal_uInt32 len); - RegError getValue(const OUString& valueName, RegValue value) const; + RegError getValue(std::u16string_view valueName, RegValue value) const; - RegError getLongListValue(const OUString& valueName, + RegError getLongListValue(std::u16string_view valueName, sal_Int32** pValueList, sal_uInt32* pLen) const; - RegError getStringListValue(const OUString& valueName, + RegError getStringListValue(std::u16string_view valueName, char*** pValueList, sal_uInt32* pLen) const; - RegError getUnicodeListValue(const OUString& valueName, + RegError getUnicodeListValue(std::u16string_view valueName, sal_Unicode*** pValueList, sal_uInt32* pLen) const; |