operator= is a function too! std::forward is still appropriate.
Fix the potentially unsafe use of std::move I added to FifoQueue.
This commit is contained in:
parent
af7ed820f5
commit
e82c9e616d
|
@ -46,7 +46,7 @@ public:
|
|||
void Push(Arg&& t)
|
||||
{
|
||||
// create the element, add it to the queue
|
||||
m_write_ptr->current = std::move(t);
|
||||
m_write_ptr->current = std::forward<Arg>(t);
|
||||
// set the next pointer to a new element ptr
|
||||
// then advance the write pointer
|
||||
ElementPtr* new_ptr = new ElementPtr();
|
||||
|
|
Loading…
Reference in New Issue