Fix: update comparator for std::sort for NamedAttribute

This PR applies a fix for the comparator being passed into std::sort to
avoid potential Mac / libc++ issues as seen in #119189

Pull Request: https://projects.blender.org/blender/blender/pulls/119385
This commit is contained in:
Sean Kim
2024-03-12 17:31:02 +01:00
committed by Jacques Lucke
parent 3c3f1e6d62
commit 1982cad490
2 changed files with 2 additions and 2 deletions
@@ -2527,7 +2527,7 @@ static std::string named_attribute_tooltip(bContext * /*C*/, void *argN, const c
std::sort(sorted_used_attribute.begin(),
sorted_used_attribute.end(),
[](const NameWithUsage &a, const NameWithUsage &b) {
return BLI_strcasecmp_natural(a.name.c_str(), b.name.c_str()) <= 0;
return BLI_strcasecmp_natural(a.name.c_str(), b.name.c_str()) < 0;
});
for (const NameWithUsage &attribute : sorted_used_attribute) {
+1 -1
View File
@@ -2236,7 +2236,7 @@ static void draw_named_attributes_panel(uiLayout *layout, NodesModifierData &nmd
std::sort(sorted_used_attribute.begin(),
sorted_used_attribute.end(),
[](const NameWithUsage &a, const NameWithUsage &b) {
return BLI_strcasecmp_natural(a.name.c_str(), b.name.c_str()) <= 0;
return BLI_strcasecmp_natural(a.name.c_str(), b.name.c_str()) < 0;
});
for (const NameWithUsage &attribute : sorted_used_attribute) {