DEV9: Use std::move in SimpleQueue

This commit is contained in:
TheLastRar 2024-06-19 23:10:37 +01:00 committed by refractionpcsx2
parent a00cb49035
commit fbac331528
1 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ void SimpleQueue<T>::Enqueue(T entry)
SimpleQueueEntry* newEntry = head.exchange(newHead);
//Fill in
newEntry->value = entry;
newEntry->value = std::move(entry);
newEntry->next = newHead;
//Set ready (can be dequeued)
@ -68,7 +68,7 @@ bool SimpleQueue<T>::Dequeue(T* entry)
SimpleQueueEntry* retEntry = tail;
tail = retEntry->next;
*entry = retEntry->value;
*entry = std::move(retEntry->value);
delete retEntry;
return true;
}