[serialize] Start implementing linking
This commit is contained in:
parent
313b3057c3
commit
d6005b49b3
|
@ -143,9 +143,13 @@ struct hb_serialize_context_t
|
||||||
assert (current.length == 1);
|
assert (current.length == 1);
|
||||||
|
|
||||||
/* Only "pack" if there exist other objects... Otherwise, don't bother.
|
/* Only "pack" if there exist other objects... Otherwise, don't bother.
|
||||||
* Saves a copy. */
|
* Saves a move. */
|
||||||
if (packed.length > 1)
|
if (packed.length == 1)
|
||||||
|
return;
|
||||||
|
|
||||||
pop_pack ();
|
pop_pack ();
|
||||||
|
|
||||||
|
link ();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
|
@ -214,6 +218,11 @@ struct hb_serialize_context_t
|
||||||
assert (packed.tail ().head == tail);
|
assert (packed.tail ().head == tail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void link ()
|
||||||
|
{
|
||||||
|
// XXX
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int length () const { return this->head - current.tail ().head; }
|
unsigned int length () const { return this->head - current.tail ().head; }
|
||||||
|
|
||||||
void align (unsigned int alignment)
|
void align (unsigned int alignment)
|
||||||
|
|
Loading…
Reference in New Issue