diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-09-21 22:32:24 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-09-21 23:15:42 -0700 |
| commit | 508ccc2054590a9efa89054e742b74521f272063 (patch) | |
| tree | b611a93de812ddf6d1ed025d72f047c1d312e6f0 /Source/Core/Common/IniFile.cpp | |
| parent | 067bdaa3ddfad15b6c08b4ab59361ebd0a31066c (diff) | |
IniFile: Migrate `Common::CaseInsensitiveLess` to StringUtil
Migrating `Common::CaseInsensitiveLess` to StringUtil.h will hopefully discourage rolling one's own solution in the future for case-insensitive associative containers when this (quite robust!) solution already exists.
`Common::CaseInsensitiveStringCompare::IsEqual` was removed in favor of using the `Common::CaseInsensitiveEquals` function.
The `a.size() != b.size()` condition in `Common::CaseInsensitiveEquals` can be removed, since `std::ranges::equal` already checks this condition (confirmed in libc++).
Diffstat (limited to 'Source/Core/Common/IniFile.cpp')
| -rw-r--r-- | Source/Core/Common/IniFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/IniFile.cpp b/Source/Core/Common/IniFile.cpp index ab20ff58fd..a7ce26976b 100644 --- a/Source/Core/Common/IniFile.cpp +++ b/Source/Core/Common/IniFile.cpp @@ -130,7 +130,7 @@ const IniFile::Section* IniFile::GetSection(std::string_view section_name) const { for (const Section& sect : sections) { - if (CaseInsensitiveStringCompare::IsEqual(sect.name, section_name)) + if (CaseInsensitiveEquals(sect.name, section_name)) return § } @@ -141,7 +141,7 @@ IniFile::Section* IniFile::GetSection(std::string_view section_name) { for (Section& sect : sections) { - if (CaseInsensitiveStringCompare::IsEqual(sect.name, section_name)) + if (CaseInsensitiveEquals(sect.name, section_name)) return § } |
