[aat.feat] Minor

This commit is contained in:
Behdad Esfahbod 2018-11-24 11:02:04 -05:00
parent 0f8e98eca2
commit 3922aae162
1 changed files with 2 additions and 10 deletions

View File

@ -40,11 +40,7 @@ namespace AAT {
struct SettingName struct SettingName
{ {
int cmp (hb_aat_layout_feature_selector_t key) const int cmp (hb_aat_layout_feature_selector_t key) const
{ { return (int) key - (int) setting; }
return key < setting ? -1 :
key > setting ? +1 :
0;
}
inline hb_aat_layout_feature_selector_t get_selector () const inline hb_aat_layout_feature_selector_t get_selector () const
{ return (hb_aat_layout_feature_selector_t) (unsigned int) setting; } { return (hb_aat_layout_feature_selector_t) (unsigned int) setting; }
@ -70,11 +66,7 @@ struct feat;
struct FeatureName struct FeatureName
{ {
int cmp (hb_aat_layout_feature_type_t key) const int cmp (hb_aat_layout_feature_type_t key) const
{ { return (int) key - (int) feature; }
return key < feature ? -1 :
key > feature ? +1 :
0;
}
enum { enum {
Exclusive = 0x8000, /* If set, the feature settings are mutually exclusive. */ Exclusive = 0x8000, /* If set, the feature settings are mutually exclusive. */