Преглед изворни кода

common: move forwarded value into SPSCQueue

Liam пре 4 година
родитељ
комит
ec64a94954
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/common/threadsafe_queue.h

+ 1 - 1
src/common/threadsafe_queue.h

@@ -39,7 +39,7 @@ public:
     template <typename Arg>
     void Push(Arg&& t) {
         // create the element, add it to the queue
-        write_ptr->current = std::forward<Arg>(t);
+        write_ptr->current = std::move(t);
         // set the next pointer to a new element ptr
         // then advance the write pointer
         ElementPtr* new_ptr = new ElementPtr();