mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Use Common::ToLower and Common::ToUpper
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user