Make sure the sort is identical
This commit is contained in:
parent
9e10c891b9
commit
48aba24f92
1 changed files with 4 additions and 3 deletions
|
|
@ -373,10 +373,11 @@ namespace OutfitSystem {
|
|||
pairs.begin(),
|
||||
pairs.end(),
|
||||
[descending](const _pair &x, const _pair &y) {
|
||||
auto result = cobb::utf8::naturalcompare(std::string(x.first.data()), std::string(y.first.data()));
|
||||
std::string a(x.first.data());
|
||||
std::string b(y.first.data());
|
||||
if (descending)
|
||||
result = -result;
|
||||
return result > 0;
|
||||
std::swap(a, b);
|
||||
return cobb::utf8::naturalcompare(a, b) > 0;
|
||||
}
|
||||
);
|
||||
for (std::uint32_t i = 0; i < size; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue