mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-23 07:51:10 +01:00
[vector] Destruct in pop()
This commit is contained in:
1 parent
7171917b52
commit
5946e945d5
1 file changed
+4
-2
+4
-2
@@ -325,8 +325,10 @@ struct hb_vector_t
|
||||
Type pop ()
|
||||
{
|
||||
if (!length) return Null (Type);
|
||||
return std::move (arrayZ[--length]); /* Does this move actually work? */
|
||||
// XXX Destruct?
|
||||
Type v = std::move (arrayZ[length - 1]);
|
||||
arrayZ[length - 1].~Type ();
|
||||
length--;
|
||||
return v;
|
||||
}
|
||||
|
||||
void remove (unsigned int i)
|
||||
|
||||
Reference in new issue
Block a user