diff options
author | howar6hill <f.eiwu@yahoo.com> | 2020-02-26 11:17:03 +0800 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-26 15:22:45 +0100 |
commit | a57f074187e0f40781a4a4f71ba08c283586b800 (patch) | |
tree | 0319d33d80f2e04f353b8d0666981a7cd8d8cd8e | |
parent | 717cd5015e91495fc28cbbe83576530905047faf (diff) | |
download | serenity-a57f074187e0f40781a4a4f71ba08c283586b800.zip |
CircularQueue: Move construct a T object instead of copy constructing it
-rw-r--r-- | AK/CircularQueue.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 |