From b233fa4bc9cdb1c6677b37106d96d878d6e03bfd Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Thu, 1 Nov 2018 20:02:57 +0330 Subject: [PATCH] [feat] Rename records to selectors as @drott --- src/hb-aat-layout-feat-table.hh | 20 ++++++++++---------- src/hb-aat-layout.cc | 10 +++++----- src/hb-aat.h | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/hb-aat-layout-feat-table.hh b/src/hb-aat-layout-feat-table.hh index 14ce990..0054dad 100644 --- a/src/hb-aat-layout-feat-table.hh +++ b/src/hb-aat-layout-feat-table.hh @@ -87,21 +87,21 @@ struct FeatureName inline unsigned int get_settings (const feat *feat, hb_aat_feature_setting_t *default_setting, unsigned int start_offset, - unsigned int *records_count, - hb_aat_feature_type_selector_t *records_buffer) const + unsigned int *selectors_count, + hb_aat_feature_type_selector_t *selectors_buffer) const { bool exclusive = featureFlags & Exclusive; bool not_default = featureFlags & NotDefault; const UnsizedArrayOf& settings = feat+settingTable; unsigned int len = 0; unsigned int settings_count = nSettings; - if (records_count && records_buffer) + if (selectors_count && selectors_buffer) { - len = MIN (settings_count - start_offset, *records_count); + len = MIN (settings_count - start_offset, *selectors_count); for (unsigned int i = 0; i < len; i++) { - records_buffer[i].name_id = settings[start_offset + i].nameIndex; - records_buffer[i].setting = settings[start_offset + i].setting; + selectors_buffer[i].name_id = settings[start_offset + i].nameIndex; + selectors_buffer[i].setting = settings[start_offset + i].setting; } } if (default_setting) @@ -111,7 +111,7 @@ struct FeatureName *default_setting = settings[index].setting; else *default_setting = HB_AAT_FEATURE_NO_DEFAULT_SETTING; } - if (records_count) *records_count = len; + if (selectors_count) *selectors_count = len; return settings_count; } @@ -156,11 +156,11 @@ struct feat inline unsigned int get_settings (hb_aat_feature_type_t type, hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */ unsigned int start_offset, - unsigned int *records_count, /* IN/OUT. May be NULL. */ - hb_aat_feature_type_selector_t *records_buffer) const + unsigned int *selectors_count, /* IN/OUT. May be NULL. */ + hb_aat_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */) const { return get_feature (type).get_settings (this, default_setting, - start_offset, records_count, records_buffer); + start_offset, selectors_count, selectors_buffer); } inline bool sanitize (hb_sanitize_context_t *c) const diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc index 04f4d6e..b4990e1 100644 --- a/src/hb-aat-layout.cc +++ b/src/hb-aat-layout.cc @@ -315,8 +315,8 @@ _hb_aat_language_get (hb_face_t *face, * @default_setting: (out): default value for the type. If it is HB_AAT_FEATURE_NO_DEFAULT_SETTING * means none is selected as default and the feature is not exclusive. * @start_offset: start offset, if you are iterating - * @records_count: (inout): gets input buffer size, puts number of filled one - * @records_buffer: (out): buffer of records + * @selectors_count: (inout): gets input buffer size, puts number of filled one + * @selectors_buffer: (out): buffer of records * * Returns: Total number of feature selector records available for the feature. * @@ -327,9 +327,9 @@ hb_aat_layout_get_feature_settings (hb_face_t *face, hb_aat_feature_type_t identifier, hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */ unsigned int start_offset, - unsigned int *records_count, /* IN/OUT. May be NULL. */ - hb_aat_feature_type_selector_t *records_buffer /* OUT. May be NULL. */) + unsigned int *selectors_count, /* IN/OUT. May be NULL. */ + hb_aat_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */) { return _get_feat (face).get_settings (identifier, default_setting, - start_offset, records_count, records_buffer); + start_offset, selectors_count, selectors_buffer); } diff --git a/src/hb-aat.h b/src/hb-aat.h index b71f67c..539abcd 100644 --- a/src/hb-aat.h +++ b/src/hb-aat.h @@ -75,8 +75,8 @@ hb_aat_layout_get_feature_settings (hb_face_t *face, hb_aat_feature_type_t type, hb_aat_feature_setting_t *default_setting, /* OUT. May be NULL. */ unsigned int start_offset, - unsigned int *records_count, /* IN/OUT. May be NULL. */ - hb_aat_feature_type_selector_t *records_buffer /* OUT. May be NULL. */); + unsigned int *selectors_count, /* IN/OUT. May be NULL. */ + hb_aat_feature_type_selector_t *selectors_buffer /* OUT. May be NULL. */); HB_END_DECLS -- 2.7.4