src/hb-ot-layout-common-private.hh | 30 +++++++++++++++--------------- src/hb-ot-tag.cc | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-)
New commits: commit d05b783322d90208b2ddf06a5ebffc7c301be3d7 Author: Behdad Esfahbod <[email protected]> Date: Tue Jan 12 16:17:21 2016 +0000 Fix compiler warning Fixes https://github.com/behdad/harfbuzz/issues/212 diff --git a/src/hb-ot-tag.cc b/src/hb-ot-tag.cc index 01ce920..9a6a120 100644 --- a/src/hb-ot-tag.cc +++ b/src/hb-ot-tag.cc @@ -927,6 +927,7 @@ hb_ot_tag_to_language (hb_tag_t tag) } } +#ifdef MAIN static inline void test_langs_sorted (void) { @@ -942,7 +943,6 @@ test_langs_sorted (void) } } -#ifdef MAIN int main (void) { commit d163dc18e66c9e2f404d09310482464245cae704 Author: Behdad Esfahbod <[email protected]> Date: Tue Jan 12 13:05:01 2016 +0000 Minor diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index 64829ac..6c7bac0 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -1170,6 +1170,21 @@ struct Device inline hb_position_t get_y_delta (hb_font_t *font) const { return get_delta (font->y_ppem, font->y_scale); } + inline unsigned int get_size (void) const + { + unsigned int f = deltaFormat; + if (unlikely (f < 1 || f > 3 || startSize > endSize)) return 3 * USHORT::static_size; + return USHORT::static_size * (4 + ((endSize - startSize) >> (4 - f))); + } + + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (c->check_struct (this) && c->check_range (this, this->get_size ())); + } + + private: + inline int get_delta (unsigned int ppem, int scale) const { if (!ppem) return 0; @@ -1180,8 +1195,6 @@ struct Device return (int) (pixels * (int64_t) scale / ppem); } - - inline int get_delta_pixels (unsigned int ppem_size) const { unsigned int f = deltaFormat; @@ -1205,19 +1218,6 @@ struct Device return delta; } - inline unsigned int get_size (void) const - { - unsigned int f = deltaFormat; - if (unlikely (f < 1 || f > 3 || startSize > endSize)) return 3 * USHORT::static_size; - return USHORT::static_size * (4 + ((endSize - startSize) >> (4 - f))); - } - - inline bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (c->check_struct (this) && c->check_range (this, this->get_size ())); - } - protected: USHORT startSize; /* Smallest size to correct--in ppem */ USHORT endSize; /* Largest size to correct--in ppem */ _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
