From: Behdad Esfahbod Date: Wed, 20 May 2009 03:58:54 +0000 (-0400) Subject: [HB] Indentation X-Git-Tag: submit/master/20120920.151126~7^2~1192 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60d77cf05fddc5304b4b1fc19cdedba15cbee1e9;p=framework%2Fuifw%2Fharfbuzz.git [HB] Indentation --- diff --git a/src/hb-ot-layout-common-private.h b/src/hb-ot-layout-common-private.h index 0dc56de..3c379a3 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