]> granicus.if.org Git - icinga2/blobdiff - lib/base/threadpool.cpp
Use std::vector::emplace_back instead of std::vector::push_back
[icinga2] / lib / base / threadpool.cpp
index 8b9b4705c4550a88b0979b5fb5734ab44b3bc787..683a6b6ddfea70721c563a2a05771010f28b5dd4 100644 (file)
@@ -212,7 +212,7 @@ bool ThreadPool::Post(const ThreadPool::WorkFunction& callback, SchedulerPolicy
                if (policy == LowLatencyScheduler)
                        queue.SpawnWorker(m_ThreadGroup);
 
-               queue.Items.push_back(wi);
+               queue.Items.emplace_back(std::move(wi));
                queue.CV.notify_one();
        }