diff --git a/src/hb-open-file.hh b/src/hb-open-file.hh index 7b140fa7c..7e916aeb6 100644 --- a/src/hb-open-file.hh +++ b/src/hb-open-file.hh @@ -86,8 +86,8 @@ typedef struct OffsetTable const TableRecord& get_table (unsigned int i) const { return tables[i]; } unsigned int get_table_tags (unsigned int start_offset, - unsigned int *table_count, /* IN/OUT */ - hb_tag_t *table_tags /* OUT */) const + unsigned int *table_count, /* IN/OUT */ + hb_tag_t *table_tags /* OUT */) const { if (table_count) { diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index b43bd40a1..23f7511b1 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -173,9 +173,6 @@ typedef Index NameID; template struct Offset : Type { - HB_DELETE_COPY_ASSIGN (Offset); - Offset () = default; - Offset& operator = (typename Type::type i) { Type::operator= (i); return *this; } typedef Type type; @@ -266,6 +263,9 @@ struct _hb_has_null template struct OffsetTo : Offset { + HB_DELETE_COPY_ASSIGN (OffsetTo); + OffsetTo () = default; + OffsetTo& operator = (typename OffsetType::type i) { OffsetType::operator= (i); return *this; } const Type& operator () (const void *base) const @@ -609,10 +609,16 @@ struct ArrayOf * we do not need to call their sanitize() as we already did * a bound check on the aggregate array size. We just include * a small unreachable expression to make sure the structs - * pointed to do have a simple sanitize(), ie. they do not + * pointed to do have a simple sanitize() as well as an + * assignment opreator. This ensures that they do not * reference other structs via offsets. */ - (void) (false && arrayZ[0].sanitize (c)); + if (false) + { + arrayZ[0].sanitize (c); + Type v; + v = arrayZ[0]; + } return_trace (true); }