From 8a17cc4ecf21f6754e2d90562d0ced7496870f74 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 5 Jan 2023 14:15:38 -0700 Subject: [PATCH] [gsubgpos] Use swap instead of move Move is wrong when we want to reuse the object. --- src/hb-ot-layout-gsubgpos.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 1eb52fcfb..6f34bc6f0 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -1590,7 +1590,7 @@ static void context_closure_recurse_lookups (hb_closure_context_t *c, covered_seq_indicies.add (seqIndex); if (has_pos_glyphs) { - c->push_cur_active_glyphs () = std::move (pos_glyphs); + hb_swap (c->push_cur_active_glyphs (), pos_glyphs); } else { c->push_cur_active_glyphs ().set (*c->glyphs); }