From 76fc27713f52cc338f0325650c2c7798f5cfa2ce Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 12 May 2022 12:14:07 -0600 Subject: [PATCH] [vector] Remove explicit std::move Was confusing compilers. Let them figure it out themselves. Makes NotoNastaliqu subsetting/1000 benchmark more than twice faster: Benchmark Time CPU Time Old Time New CPU Old CPU New ------------------------------------------------------------------------------------------------------------------------------------------------------------ BM_subset/subset_glyphs/NotoNastaliqUrdu-Regular.ttf/1000 -0.5064 -0.5065 111 55 110 55 BM_subset/subset_codepoints/NotoNastaliqUrdu-Regular.ttf/1000 -0.5494 -0.5493 132 59 131 59 --- src/hb-vector.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-vector.hh b/src/hb-vector.hh index eefae3834..b275b522f 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -340,7 +340,7 @@ struct hb_vector_t : std::conditional, hb_empty Type pop () { if (!length) return Null (Type); - Type v = std::move (arrayZ[length - 1]); + Type v = arrayZ[length - 1]; arrayZ[length - 1].~Type (); length--; return v;