mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
CircularQueue: Move construct a T object instead of copy constructing it
This commit is contained in:
parent
717cd5015e
commit
a57f074187
Notes:
sideshowbarker
2024-07-19 17:38:34 +09:00
Author: https://github.com/f-eiwu
Commit: a57f074187
Pull-request: https://github.com/SerenityOS/serenity/pull/1301
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue