diff --git a/src/hb-serialize.hh b/src/hb-serialize.hh index 328c7b401..ece4d92a9 100644 --- a/src/hb-serialize.hh +++ b/src/hb-serialize.hh @@ -51,12 +51,6 @@ enum hb_serialize_error_t { }; HB_MARK_AS_FLAG_T (hb_serialize_error_t); -// This is a 0 byte wide offset, used to add virtual links to the serializer object graph. -// It does not correspond to a real offset and exists soley to enforce an ordering constraint -// in the graph's packed order. -struct VirtualOffset { -}; - struct hb_serialize_context_t { typedef unsigned objidx_t; @@ -364,7 +358,7 @@ struct hb_serialize_context_t assert (packed.tail ()->head == tail); } - void add_link (VirtualOffset &ofs, objidx_t objidx) + void add_virtual_link (objidx_t objidx) { // This link is not associated with an actual offset and exists merely to enforce // an ordering constraint. @@ -374,7 +368,6 @@ struct hb_serialize_context_t return; assert (current); - assert (current->head <= (const char *) &ofs); auto& link = *current->links.push (); if (current->links.in_error ()) diff --git a/src/test-repacker.cc b/src/test-repacker.cc index 66e5aa1e7..4df063629 100644 --- a/src/test-repacker.cc +++ b/src/test-repacker.cc @@ -100,8 +100,7 @@ static void run_resolve_overflow_test (const char* name, static void add_virtual_offset (unsigned id, hb_serialize_context_t* c) { - VirtualOffset* offset = c->start_embed (); - c->add_link (*offset, id); + c->add_virtual_link (id); } static void