[cbdt] Use vector tail()

This commit is contained in:
Behdad Esfahbod 2022-11-20 14:11:51 -07:00
parent 87a88117c8
commit d119568df6
1 changed files with 3 additions and 3 deletions

View File

@ -468,13 +468,13 @@ struct IndexSubtableRecord
if (unlikely (!c->serializer->check_success (records->resize (records->length + 1)))) if (unlikely (!c->serializer->check_success (records->resize (records->length + 1))))
return_trace (false); return_trace (false);
(*records)[records->length - 1].firstGlyphIndex = 1; records->tail ().firstGlyphIndex = 1;
(*records)[records->length - 1].lastGlyphIndex = 0; records->tail ().lastGlyphIndex = 0;
bitmap_size_context->size += IndexSubtableRecord::min_size; bitmap_size_context->size += IndexSubtableRecord::min_size;
c->serializer->push (); c->serializer->push ();
if (unlikely (!add_new_subtable (c, bitmap_size_context, &((*records)[records->length - 1]), lookup, base, start))) if (unlikely (!add_new_subtable (c, bitmap_size_context, &(records->tail ()), lookup, base, start)))
{ {
c->serializer->pop_discard (); c->serializer->pop_discard ();
c->serializer->revert (snap); c->serializer->revert (snap);