Obj: try to fix Linux tests

Related to previous D14368 bug fix, the sorting
operator was not necessarily a stable order sort.
This commit is contained in:
Aras Pranckevicius
2022-03-22 06:37:55 +02:00
parent 127baac44d
commit 8c072cdc93

View File

@@ -207,7 +207,10 @@ void OBJMesh::calc_poly_order()
blender::parallel_sort(poly_order_.begin(), poly_order_.end(), [&](int a, int b) {
int mat_a = mpolys[a].mat_nr;
int mat_b = mpolys[b].mat_nr;
return mat_a < mat_b;
if (mat_a != mat_b) {
return mat_a < mat_b;
}
return a < b;
});
}