[cff-common] Remove special-casing of count=0 in INDEX serialize

The generic code-path now can handle count=0.
This commit is contained in:
Behdad Esfahbod committed 2022-05-06 13:33:13 -06:00
1 parent fc7f51aece
commit 2884eb97bf
1 file changed
+3 -12
+3 -12
View File
@@ -172,18 +172,9 @@ struct CFFIndex
Iterator it)
{
TRACE_SERIALIZE (this);
if (!it)
{
COUNT *dest = c->allocate_min<COUNT> ();
if (unlikely (!dest)) return_trace (false);
*dest = 0;
}
else
{
serialize_header(c, + it | hb_map ([] (const byte_str_t &_) { return _.length; }));
for (const auto &_ : +it)
_.copy (c);
}
serialize_header(c, + it | hb_map ([] (const byte_str_t &_) { return _.length; }));
for (const auto &_ : +it)
_.copy (c);
return_trace (true);
}