USB: Cleanup const reference warnings.

Codacy warning: Function parameter should be passed by const reference.
This commit is contained in:
lightningterror 2022-08-26 15:11:34 +02:00
parent 0bf6f9d596
commit 02e4e4da01
2 changed files with 8 additions and 8 deletions

View File

@ -465,7 +465,7 @@ const KeyIndexA& CIniSectionA::GetKeys() const
return m_keys;
}
std::string CIniSectionA::GetKeyValue(std::string sKey) const
std::string CIniSectionA::GetKeyValue(const std::string& sKey) const
{
std::string sValue;
CIniKeyA* pKey = GetKey(sKey);
@ -476,7 +476,7 @@ std::string CIniSectionA::GetKeyValue(std::string sKey) const
return sValue;
}
void CIniSectionA::SetKeyValue(std::string sKey, const std::string& sValue)
void CIniSectionA::SetKeyValue(const std::string& sKey, const std::string& sValue)
{
CIniKeyA* pKey = AddKey(sKey);
if (pKey)
@ -965,7 +965,7 @@ const KeyIndexW& CIniSectionW::GetKeys() const
return m_keys;
}
std::wstring CIniSectionW::GetKeyValue(std::wstring sKey) const
std::wstring CIniSectionW::GetKeyValue(const std::wstring& sKey) const
{
std::wstring sValue;
CIniKeyW* pKey = GetKey(sKey);
@ -976,7 +976,7 @@ std::wstring CIniSectionW::GetKeyValue(std::wstring sKey) const
return sValue;
}
void CIniSectionW::SetKeyValue(std::wstring sKey, const std::wstring& sValue)
void CIniSectionW::SetKeyValue(const std::wstring& sKey, const std::wstring& sValue)
{
CIniKeyW* pKey = AddKey(sKey);
if (pKey)

View File

@ -203,9 +203,9 @@ public:
// Returns all keys in the section by KeyIndex only to be used for enumeration
const KeyIndexA& GetKeys() const;
// Returns a KeyValue at a certain section
std::string GetKeyValue(std::string sKey) const;
std::string GetKeyValue(const std::string& sKey) const;
// Sets a KeyValuePair at a certain section
void SetKeyValue(std::string sKey, const std::string& sValue);
void SetKeyValue(const std::string& sKey, const std::string& sValue);
// Sets the section name, returns true on success, fails if the section
// name sSectionName already exists
bool SetSectionName(std::string sSectionName);
@ -439,9 +439,9 @@ public:
// Returns all keys in the section by KeyIndex only to be used for enumeration
const KeyIndexW& GetKeys() const;
// Returns a KeyValue at a certain section
std::wstring GetKeyValue(std::wstring sKey) const;
std::wstring GetKeyValue(const std::wstring& sKey) const;
// Sets a KeyValuePair at a certain section
void SetKeyValue(std::wstring sKey, const std::wstring& sValue);
void SetKeyValue(const std::wstring& sKey, const std::wstring& sValue);
// Sets the section name, returns true on success, fails if the section
// name sSectionName already exists
bool SetSectionName(std::wstring sSectionName);