From a57f074187e0f40781a4a4f71ba08c283586b800 Mon Sep 17 00:00:00 2001 From: howar6hill Date: Wed, 26 Feb 2020 11:17:03 +0800 Subject: [PATCH] CircularQueue: Move construct a T object instead of copy constructing it --- AK/CircularQueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/CircularQueue.h b/AK/CircularQueue.h index 69f641aa28..d85f4409d3 100644 --- a/AK/CircularQueue.h +++ b/AK/CircularQueue.h @@ -64,7 +64,7 @@ public: if (m_size == Capacity) slot.~T(); - new (&slot) T(value); + new (&slot) T(move(value)); if (m_size == Capacity) m_head = (m_head + 1) % Capacity; else