[repacker] remove VirtualOffset struct.
Make and add_virtual_link () specialization of add_link() instead.
diff --git a/src/hb-serialize.hh b/src/hb-serialize.hh
index 328c7b4..ece4d92 100644
--- a/src/hb-serialize.hh
+++ b/src/hb-serialize.hh
@@ -51,12 +51,6 @@
};
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 @@
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 @@
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 66e5aa1..4df0636 100644
--- a/src/test-repacker.cc
+++ b/src/test-repacker.cc
@@ -100,8 +100,7 @@
static void add_virtual_offset (unsigned id,
hb_serialize_context_t* c)
{
- VirtualOffset* offset = c->start_embed<VirtualOffset> ();
- c->add_link (*offset, id);
+ c->add_virtual_link (id);
}
static void