From 60d77cf05fddc5304b4b1fc19cdedba15cbee1e9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 19 May 2009 23:58:54 -0400 Subject: [PATCH] [HB] Indentation --- src/hb-ot-layout-common-private.h | 170 ++++++++++++++-------------- src/hb-ot-layout-gdef-private.h | 65 ++++++----- src/hb-ot-layout-gsubgpos-private.h | 150 +++++++++++++----------- src/hb-ot-layout-open-private.h | 159 +++++++++++++------------- src/hb-ot-layout-private.h | 9 +- 5 files changed, 288 insertions(+), 265 deletions(-) diff --git a/src/hb-ot-layout-common-private.h b/src/hb-ot-layout-common-private.h index 0dc56dee6..3c379a31a 100644 --- a/src/hb-ot-layout-common-private.h +++ b/src/hb-ot-layout-common-private.h @@ -42,7 +42,8 @@ */ template -struct Record { +struct Record +{ Tag tag; /* 4-byte Tag identifier */ OffsetTo offset; /* Offset from beginning of object holding @@ -50,12 +51,15 @@ struct Record { }; template -struct RecordListOf : ArrayOf > { - inline const Type& operator [] (unsigned int i) const { +struct RecordListOf : ArrayOf > +{ + inline const Type& operator [] (unsigned int i) const + { if (HB_UNLIKELY (i >= this->len)) return Null(Type); return this+this->array[i].offset; } - inline const Tag& get_tag (unsigned int i) const { + inline const Tag& get_tag (unsigned int i) const + { if (HB_UNLIKELY (i >= this->len)) return Null(Tag); return this->array[i].tag; } @@ -73,20 +77,14 @@ typedef Record FeatureRecord; ASSERT_SIZE (FeatureRecord, 6); -struct LangSys { +struct LangSys +{ + inline const unsigned int get_feature_index (unsigned int i) const { return featureIndex[i]; } + inline unsigned int get_feature_count (void) const { return featureIndex.len; } - inline const unsigned int get_feature_index (unsigned int i) const { - return featureIndex[i]; - } - inline unsigned int get_feature_count (void) const { - return featureIndex.len; - } - - inline const bool has_required_feature (void) const { - return reqFeatureIndex != 0xffff; - } - /* Returns NO_INDEX if none */ - inline int get_required_feature_index (void) const { + inline const bool has_required_feature (void) const { return reqFeatureIndex != 0xffff; } + inline int get_required_feature_index (void) const + { if (reqFeatureIndex == 0xffff) return NO_INDEX; return reqFeatureIndex;; @@ -103,28 +101,21 @@ struct LangSys { ASSERT_SIZE_DATA (LangSys, 6, "\0\0\xFF\xFF"); -struct Script { - - inline const LangSys& get_lang_sys (unsigned int i) const { +struct Script +{ + inline const LangSys& get_lang_sys (unsigned int i) const + { if (i == NO_INDEX) return get_default_lang_sys (); return this+langSys[i].offset; } - inline unsigned int get_lang_sys_count (void) const { - return langSys.len; - } - inline const Tag& get_lang_sys_tag (unsigned int i) const { - return langSys[i].tag; - } + inline unsigned int get_lang_sys_count (void) const { return langSys.len; } + inline const Tag& get_lang_sys_tag (unsigned int i) const { return langSys[i].tag; } // LONGTERMTODO bsearch DEFINE_TAG_FIND_INTERFACE (LangSys, lang_sys); /* find_lang_sys_index (), get_lang_sys_by_tag (tag) */ - inline const bool has_default_lang_sys (void) const { - return defaultLangSys != 0; - } - inline const LangSys& get_default_lang_sys (void) const { - return this+defaultLangSys; - } + inline const bool has_default_lang_sys (void) const { return defaultLangSys != 0; } + inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; } private: OffsetTo @@ -140,14 +131,10 @@ typedef RecordListOf