mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Use Common::ToLower and Common::ToUpper
This commit is contained in:
parent
aaec64501a
commit
6e5f4125e3
16 changed files with 29 additions and 47 deletions
|
@ -146,13 +146,9 @@ bool FileInfoGCWii::NameCaseInsensitiveEquals(std::string_view other) const
|
|||
// other is in UTF-8 and this is in Shift-JIS, so we convert so that we can compare correctly
|
||||
const std::string this_utf8 = SHIFTJISToUTF8(this_ptr);
|
||||
return std::equal(this_utf8.cbegin(), this_utf8.cend(), other.cbegin() + i, other.cend(),
|
||||
[](char a, char b) {
|
||||
return std::tolower(a, std::locale::classic()) ==
|
||||
std::tolower(b, std::locale::classic());
|
||||
});
|
||||
[](char a, char b) { return Common::ToLower(a) == Common::ToLower(b); });
|
||||
}
|
||||
else if (std::tolower(*this_ptr, std::locale::classic()) !=
|
||||
std::tolower(*other_ptr, std::locale::classic()))
|
||||
else if (Common::ToLower(*this_ptr) != Common::ToLower(*other_ptr))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue