diff --git a/src/hb-ot-layout-gsub-private.h b/src/hb-ot-layout-gsub-private.h index 3fcd3442f..fb44ed06c 100644 --- a/src/hb-ot-layout-gsub-private.h +++ b/src/hb-ot-layout-gsub-private.h @@ -551,10 +551,10 @@ struct ReverseChainSingleSubstFormat1 { if (HB_LIKELY (index == NOT_COVERED)) return false; - const OffsetArrayOf &lookahead = * (const OffsetArrayOf *) - ((const char *) &backtrack + backtrack.get_size ()); - const ArrayOf &substitute = * (const ArrayOf *) - ((const char *) &lookahead + lookahead.get_size ()); + const OffsetArrayOf &lookahead = (const OffsetArrayOf&) + *((const char *) &backtrack + backtrack.get_size ()); + const ArrayOf &substitute = (const ArrayOf&) + *((const char *) &lookahead + lookahead.get_size ()); if (match_backtrack (APPLY_ARG, backtrack.len, (USHORT *) backtrack.array, diff --git a/src/hb-ot-layout-gsubgpos-private.h b/src/hb-ot-layout-gsubgpos-private.h index fd0c55120..946101009 100644 --- a/src/hb-ot-layout-gsubgpos-private.h +++ b/src/hb-ot-layout-gsubgpos-private.h @@ -61,12 +61,12 @@ static inline bool match_glyph (hb_codepoint_t glyph_id, const USHORT &value, ch } static inline bool match_class (hb_codepoint_t glyph_id, const USHORT &value, char *data) { - const ClassDef &class_def = * (const ClassDef *) data; + const ClassDef &class_def = (const ClassDef &)*data; return class_def.get_class (glyph_id) == value; } static inline bool match_coverage (hb_codepoint_t glyph_id, const USHORT &value, char *data) { - const OffsetTo &coverage = * (const OffsetTo *) &value; + const OffsetTo &coverage = (const OffsetTo&)value; return (data+coverage) (glyph_id) != NOT_COVERED; } @@ -457,12 +457,12 @@ struct ChainRule { private: inline bool apply (APPLY_ARG_DEF, ChainContextLookupContext &context) const { - const HeadlessArrayOf &input = * (const HeadlessArrayOf *) - ((const char *) &backtrack + backtrack.get_size ()); - const ArrayOf &lookahead = * (const ArrayOf *) - ((const char *) &input + input.get_size ()); - const ArrayOf &lookup = * (const ArrayOf *) - ((const char *) &lookahead + lookahead.get_size ()); + const HeadlessArrayOf &input = (const HeadlessArrayOf&) + *((const char *) &backtrack + backtrack.get_size ()); + const ArrayOf &lookahead = (const ArrayOf&) + *((const char *) &input + input.get_size ()); + const ArrayOf &lookup = (const ArrayOf&) + *((const char *) &lookahead + lookahead.get_size ()); return chain_context_lookup (APPLY_ARG, backtrack.len, backtrack.array, input.len, input.array + 1, @@ -602,17 +602,17 @@ struct ChainContextFormat3 { inline bool apply (APPLY_ARG_DEF, apply_lookup_func_t apply_func) const { - const OffsetArrayOf &input = * (const OffsetArrayOf *) - ((const char *) &backtrack + backtrack.get_size ()); + const OffsetArrayOf &input = (const OffsetArrayOf&) + *((const char *) &backtrack + backtrack.get_size ()); unsigned int index = (this+input[0]) (IN_CURGLYPH ()); if (HB_LIKELY (index == NOT_COVERED)) return false; - const OffsetArrayOf &lookahead = * (const OffsetArrayOf *) - ((const char *) &input + input.get_size ()); - const ArrayOf &lookup = * (const ArrayOf *) - ((const char *) &lookahead + lookahead.get_size ()); + const OffsetArrayOf &lookahead = (const OffsetArrayOf&) + *((const char *) &input + input.get_size ()); + const ArrayOf &lookup = (const ArrayOf&) + *((const char *) &lookahead + lookahead.get_size ()); struct ChainContextLookupContext context = { {match_coverage, apply_func}, {(char *) this, (char *) this, (char *) this} diff --git a/src/hb-ot-layout-open-private.h b/src/hb-ot-layout-open-private.h index befb1d3a4..c4ab9a183 100644 --- a/src/hb-ot-layout-open-private.h +++ b/src/hb-ot-layout-open-private.h @@ -300,7 +300,7 @@ struct OffsetTo : Offset { inline const Type& operator() (const void *base) const { unsigned int offset = *this; if (HB_UNLIKELY (!offset)) return Null(Type); - return * (const Type *) ((const char *) base + offset); + return (const Type&)*((const char *) base + offset); } }; template