mirror of https://github.com/PCSX2/pcsx2.git
USB: Cleanup const reference warnings.
Codacy warning: Function parameter should be passed by const reference.
This commit is contained in:
parent
0bf6f9d596
commit
02e4e4da01
|
@ -465,7 +465,7 @@ const KeyIndexA& CIniSectionA::GetKeys() const
|
||||||
return m_keys;
|
return m_keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CIniSectionA::GetKeyValue(std::string sKey) const
|
std::string CIniSectionA::GetKeyValue(const std::string& sKey) const
|
||||||
{
|
{
|
||||||
std::string sValue;
|
std::string sValue;
|
||||||
CIniKeyA* pKey = GetKey(sKey);
|
CIniKeyA* pKey = GetKey(sKey);
|
||||||
|
@ -476,7 +476,7 @@ std::string CIniSectionA::GetKeyValue(std::string sKey) const
|
||||||
return sValue;
|
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);
|
CIniKeyA* pKey = AddKey(sKey);
|
||||||
if (pKey)
|
if (pKey)
|
||||||
|
@ -965,7 +965,7 @@ const KeyIndexW& CIniSectionW::GetKeys() const
|
||||||
return m_keys;
|
return m_keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring CIniSectionW::GetKeyValue(std::wstring sKey) const
|
std::wstring CIniSectionW::GetKeyValue(const std::wstring& sKey) const
|
||||||
{
|
{
|
||||||
std::wstring sValue;
|
std::wstring sValue;
|
||||||
CIniKeyW* pKey = GetKey(sKey);
|
CIniKeyW* pKey = GetKey(sKey);
|
||||||
|
@ -976,7 +976,7 @@ std::wstring CIniSectionW::GetKeyValue(std::wstring sKey) const
|
||||||
return sValue;
|
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);
|
CIniKeyW* pKey = AddKey(sKey);
|
||||||
if (pKey)
|
if (pKey)
|
||||||
|
|
|
@ -203,9 +203,9 @@ public:
|
||||||
// Returns all keys in the section by KeyIndex only to be used for enumeration
|
// Returns all keys in the section by KeyIndex only to be used for enumeration
|
||||||
const KeyIndexA& GetKeys() const;
|
const KeyIndexA& GetKeys() const;
|
||||||
// Returns a KeyValue at a certain section
|
// 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
|
// 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
|
// Sets the section name, returns true on success, fails if the section
|
||||||
// name sSectionName already exists
|
// name sSectionName already exists
|
||||||
bool SetSectionName(std::string sSectionName);
|
bool SetSectionName(std::string sSectionName);
|
||||||
|
@ -439,9 +439,9 @@ public:
|
||||||
// Returns all keys in the section by KeyIndex only to be used for enumeration
|
// Returns all keys in the section by KeyIndex only to be used for enumeration
|
||||||
const KeyIndexW& GetKeys() const;
|
const KeyIndexW& GetKeys() const;
|
||||||
// Returns a KeyValue at a certain section
|
// 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
|
// 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
|
// Sets the section name, returns true on success, fails if the section
|
||||||
// name sSectionName already exists
|
// name sSectionName already exists
|
||||||
bool SetSectionName(std::wstring sSectionName);
|
bool SetSectionName(std::wstring sSectionName);
|
||||||
|
|
Loading…
Reference in New Issue