diff --git a/src/OT/Layout/GSUB/AlternateSet.hh b/src/OT/Layout/GSUB/AlternateSet.hh index 4a9e9672e..fbc2b0a90 100644 --- a/src/OT/Layout/GSUB/AlternateSet.hh +++ b/src/OT/Layout/GSUB/AlternateSet.hh @@ -94,7 +94,7 @@ struct AlternateSet template bool serialize (hb_serialize_context_t *c, - Iterator alts) + Iterator&& alts) { TRACE_SERIALIZE (this); return_trace (alternates.serialize (c, alts)); diff --git a/src/OT/Layout/GSUB/Ligature.hh b/src/OT/Layout/GSUB/Ligature.hh index f373d921b..04450025e 100644 --- a/src/OT/Layout/GSUB/Ligature.hh +++ b/src/OT/Layout/GSUB/Ligature.hh @@ -149,7 +149,7 @@ struct Ligature hb_requires (hb_is_source_of (Iterator, hb_codepoint_t))> bool serialize (hb_serialize_context_t *c, hb_codepoint_t ligature, - Iterator components /* Starting from second */) + Iterator&& components /* Starting from second */) { TRACE_SERIALIZE (this); if (unlikely (!c->extend_min (this))) return_trace (false); diff --git a/src/OT/Layout/GSUB/Sequence.hh b/src/OT/Layout/GSUB/Sequence.hh index 3d84a5e6e..393596783 100644 --- a/src/OT/Layout/GSUB/Sequence.hh +++ b/src/OT/Layout/GSUB/Sequence.hh @@ -132,7 +132,7 @@ struct Sequence template bool serialize (hb_serialize_context_t *c, - Iterator subst) + Iterator&& subst) { TRACE_SERIALIZE (this); return_trace (substitute.serialize (c, subst)); diff --git a/src/OT/Layout/GSUB/SubstLookup.hh b/src/OT/Layout/GSUB/SubstLookup.hh index 320685b86..7bd20c776 100644 --- a/src/OT/Layout/GSUB/SubstLookup.hh +++ b/src/OT/Layout/GSUB/SubstLookup.hh @@ -106,7 +106,7 @@ struct SubstLookup : Lookup bool serialize_single (hb_serialize_context_t *c, uint32_t lookup_props, Glyphs glyphs, - Substitutes substitutes) + Substitutes&& substitutes) { TRACE_SERIALIZE (this); if (unlikely (!Lookup::serialize (c, SubTable::Single, lookup_props, 1))) return_trace (false); diff --git a/src/OT/glyf/glyf-helpers.hh b/src/OT/glyf/glyf-helpers.hh index 181c33d06..405761acc 100644 --- a/src/OT/glyf/glyf-helpers.hh +++ b/src/OT/glyf/glyf-helpers.hh @@ -53,7 +53,7 @@ _add_head_and_set_loca_version (hb_subset_plan_t *plan, bool use_short_loca) template static bool -_add_loca_and_head (hb_subset_plan_t * plan, Iterator padded_offsets, bool use_short_loca) +_add_loca_and_head (hb_subset_plan_t * plan, Iterator&& padded_offsets, bool use_short_loca) { unsigned num_offsets = padded_offsets.len () + 1; unsigned entry_size = use_short_loca ? 2 : 4; diff --git a/src/hb-open-file.hh b/src/hb-open-file.hh index 6eee5827c..7f37766df 100644 --- a/src/hb-open-file.hh +++ b/src/hb-open-file.hh @@ -122,7 +122,7 @@ typedef struct OpenTypeOffsetTable hb_requires ((hb_is_source_of>::value))> bool serialize (hb_serialize_context_t *c, hb_tag_t sfnt_tag, - Iterator it) + Iterator&& it) { TRACE_SERIALIZE (this); /* Alloc 12 for the OTHeader. */ @@ -496,7 +496,7 @@ struct OpenTypeFontFile hb_requires ((hb_is_source_of>::value))> bool serialize_single (hb_serialize_context_t *c, hb_tag_t sfnt_tag, - Iterator items) + Iterator&& items) { TRACE_SERIALIZE (this); assert (sfnt_tag != TTCTag); diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index d0d01a68c..8fe6eedd2 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -504,7 +504,7 @@ struct UnsizedArrayOf } template - bool serialize (hb_serialize_context_t *c, Iterator items) + bool serialize (hb_serialize_context_t *c, Iterator&& items) { TRACE_SERIALIZE (this); unsigned count = items.len (); @@ -683,7 +683,7 @@ struct ArrayOf } template - HB_NODISCARD bool serialize (hb_serialize_context_t *c, Iterator items) + HB_NODISCARD bool serialize (hb_serialize_context_t *c, Iterator&& items) { TRACE_SERIALIZE (this); unsigned count = items.len (); @@ -841,7 +841,7 @@ struct HeadlessArrayOf } template - bool serialize (hb_serialize_context_t *c, Iterator items) + bool serialize (hb_serialize_context_t *c, Iterator&& items) { TRACE_SERIALIZE (this); unsigned count = items.len (); diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh index 1f2131ffc..e9cc26876 100644 --- a/src/hb-ot-name-table.hh +++ b/src/hb-ot-name-table.hh @@ -215,7 +215,7 @@ struct name template bool serialize (hb_serialize_context_t *c, - Iterator it, + Iterator&& it, const void *src_string_pool) { TRACE_SERIALIZE (this);