From 2892fc71e8733890db666afe0ccbd491c0c0bbd2 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 18 Nov 2022 18:03:59 -0700 Subject: [PATCH] [vector] Add std::move to pop() This was removed in 76fc27713f52cc338f0325650c2c7798f5cfa2ce, but I believe that was faultly. It was because of a bad move implementation in the set. --- 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 58286892b..f9c7cf7b3 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -364,7 +364,7 @@ struct hb_vector_t Type pop () { if (!length) return Null (Type); - Type v = arrayZ[length - 1]; + Type v {std::move (arrayZ[length - 1])}; arrayZ[length - 1].~Type (); length--; return v;