Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2022-04-27 17:18:23 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-04-27 17:18:37 +0300
commitf3d5114c41352161d0dad7f30ef6b7dd1f28df85 (patch)
treeabe2668a653eaeaccff3fefff39620b99715c9f9 /source/blender/nodes/geometry
parentce115a27862dcffff0c407b0a439b66aadb82398 (diff)
Fix T93285: Wrong instance order when instancing a collection
At least on the Mac, `std::sort` sometimes passes the same value in the `a` and `b` parameters. The `true` return is only for cases where `a` is less than `b`.
Diffstat (limited to 'source/blender/nodes/geometry')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_collection_info.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc b/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc
index 68d42444afd..54a061993a3 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_collection_info.cc
@@ -120,7 +120,7 @@ static void node_geo_exec(GeoNodeExecParams params)
std::sort(entries.begin(),
entries.end(),
[](const InstanceListEntry &a, const InstanceListEntry &b) {
- return BLI_strcasecmp_natural(a.name, b.name) <= 0;
+ return BLI_strcasecmp_natural(a.name, b.name) < 0;
});
for (const InstanceListEntry &entry : entries) {
instances.add_instance(entry.handle, entry.transform);