diff --git a/src/hb-object.hh b/src/hb-object.hh index d7bcb61bd..a23c25f7c 100644 --- a/src/hb-object.hh +++ b/src/hb-object.hh @@ -80,7 +80,7 @@ struct hb_lockable_set_t if (item) { item_t old = *item; - *item = std::move (items[items.length - 1]); + *item = std::move (items.tail ()); items.pop (); l.unlock (); old.fini (); @@ -123,7 +123,7 @@ struct hb_lockable_set_t l.lock (); while (items.length) { - item_t old = items[items.length - 1]; + item_t old = items.tail (); items.pop (); l.unlock (); old.fini ();