mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
Moved helper compare strings function above
This commit is contained in:
parent
ed09da49df
commit
aab9e5fdad
@ -70,6 +70,12 @@ public:
|
||||
return (size[size.size() - 2] == 'G') ? num * 1024 : num;
|
||||
}
|
||||
|
||||
static bool CompareStringsCaseInsensitive(std::string_view a, std::string_view b) {
|
||||
auto lhs = a | std::views::transform(::tolower);
|
||||
auto rhs = b | std::views::transform(::tolower);
|
||||
return std::ranges::lexicographical_compare(lhs, rhs);
|
||||
}
|
||||
|
||||
static bool CompareStringsAscending(GameInfo a, GameInfo b, int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 1: {
|
||||
@ -121,10 +127,4 @@ public:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static bool CompareStringsCaseInsensitive(std::string_view a, std::string_view b) {
|
||||
auto lhs = a | std::views::transform(::tolower);
|
||||
auto rhs = b | std::views::transform(::tolower);
|
||||
return std::ranges::lexicographical_compare(lhs, rhs);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user