Make feature sorting stable
This commit is contained in:
parent
fdc322a820
commit
81a77b115d
|
@ -102,6 +102,7 @@ struct hb_mask_allocator_t {
|
||||||
struct feature_info_t {
|
struct feature_info_t {
|
||||||
hb_tag_t tag;
|
hb_tag_t tag;
|
||||||
unsigned int value;
|
unsigned int value;
|
||||||
|
unsigned int seq;
|
||||||
bool global;
|
bool global;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -113,7 +114,7 @@ struct hb_mask_allocator_t {
|
||||||
if (a->tag != b->tag)
|
if (a->tag != b->tag)
|
||||||
return a->tag < b->tag ? -1 : 1;
|
return a->tag < b->tag ? -1 : 1;
|
||||||
|
|
||||||
return p1 < p2 ? -1 : 1;
|
return a->seq < b->seq ? -1 : 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -142,6 +143,7 @@ struct hb_mask_allocator_t {
|
||||||
feature_info_t *info = &infos[count++];
|
feature_info_t *info = &infos[count++];
|
||||||
info->tag = tag;
|
info->tag = tag;
|
||||||
info->value = value;
|
info->value = value;
|
||||||
|
info->seq = count;
|
||||||
info->global = global;
|
info->global = global;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue