diff --git a/src/dsl/operation/ChronoTask.hpp b/src/dsl/operation/ChronoTask.hpp index 29052fc6c..840effcee 100644 --- a/src/dsl/operation/ChronoTask.hpp +++ b/src/dsl/operation/ChronoTask.hpp @@ -47,7 +47,7 @@ namespace dsl { ChronoTask(std::function&& task, NUClear::clock::time_point time, uint64_t id) - : task(task), time(time), id(id) {} + : task(std::move(task)), time(time), id(id) {} /** * @brief Run the task and return true if the time has been updated to run again diff --git a/src/dsl/word/Last.hpp b/src/dsl/word/Last.hpp index 1db8ebfed..fd1adc961 100644 --- a/src/dsl/word/Last.hpp +++ b/src/dsl/word/Last.hpp @@ -36,7 +36,7 @@ namespace dsl { LastItemStorage() : list() {} - LastItemStorage(T&& data) : list({data}) {} + LastItemStorage(T&& data) : list({std::move(data)}) {} template operator std::list() const { diff --git a/src/dsl/word/Network.hpp b/src/dsl/word/Network.hpp index 7d02c0148..21dd8c662 100644 --- a/src/dsl/word/Network.hpp +++ b/src/dsl/word/Network.hpp @@ -34,7 +34,7 @@ namespace dsl { NetworkData() : std::shared_ptr() {} NetworkData(T* ptr) : std::shared_ptr(ptr) {} NetworkData(const std::shared_ptr& ptr) : std::shared_ptr(ptr) {} - NetworkData(std::shared_ptr&& ptr) : std::shared_ptr(ptr) {} + NetworkData(std::shared_ptr&& ptr) : std::shared_ptr(std::move(ptr)) {} }; struct NetworkSource { diff --git a/src/threading/Reaction.cpp b/src/threading/Reaction.cpp index 78c11d3f0..a23572d0d 100644 --- a/src/threading/Reaction.cpp +++ b/src/threading/Reaction.cpp @@ -24,7 +24,10 @@ namespace threading { std::atomic Reaction::reaction_id_source(0); // NOLINT Reaction::Reaction(Reactor& reactor, ReactionIdentifiers&& identifiers, TaskGenerator&& generator) - : reactor(reactor), identifiers(identifiers), id(++reaction_id_source), generator(generator) {} + : reactor(reactor) + , identifiers(std::move(identifiers)) + , id(++reaction_id_source) + , generator(std::move(generator)) {} void Reaction::unbind() { // Unbind diff --git a/src/threading/ReactionTask.hpp b/src/threading/ReactionTask.hpp index 289f9b933..43035f84f 100644 --- a/src/threading/ReactionTask.hpp +++ b/src/threading/ReactionTask.hpp @@ -93,7 +93,7 @@ namespace threading { , emit_stats(parent.emit_stats && (current_task != nullptr ? current_task->emit_stats : true)) , group_descriptor(group_descriptor) , thread_pool_descriptor(thread_pool_descriptor) - , callback(callback) {} + , callback(std::move(callback)) {} /**