mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-04 01:15:41 +02:00
Type promotion for comparison
This commit is contained in:
@@ -798,6 +798,13 @@ struct sorter {
|
||||
mvt_value av = a.value(attr);
|
||||
mvt_value bv = b.value(attr);
|
||||
|
||||
av = av.promote_for_comparison_with(bv);
|
||||
bv = bv.promote_for_comparison_with(av);
|
||||
if (av.type != bv.type) {
|
||||
fprintf(stderr, "Sorter: can't happen\n");
|
||||
exit(EXIT_IMPOSSIBLE);
|
||||
}
|
||||
|
||||
return av < bv;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user