From dba56bce348fdfd70b33312258dd1a45a97d56ce Mon Sep 17 00:00:00 2001 From: Trent Houliston Date: Fri, 9 Aug 2024 16:29:01 +1000 Subject: [PATCH] ct --- src/threading/scheduler/Group.cpp | 8 ++++---- src/threading/scheduler/Group.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/threading/scheduler/Group.cpp b/src/threading/scheduler/Group.cpp index 58ab34f7..37ad6238 100644 --- a/src/threading/scheduler/Group.cpp +++ b/src/threading/scheduler/Group.cpp @@ -35,11 +35,11 @@ namespace threading { Group::LockHandle::LockHandle(const NUClear::id_t& task_id, const int& priority, const bool& locked, - const std::function& notify) - : task_id(task_id), priority(priority), locked(locked), notify(notify) {} + std::function notify) + : task_id(task_id), priority(priority), locked(locked), notify(std::move(notify)) {} - Group::GroupLock::GroupLock(Group& group, const std::shared_ptr& handle) - : group(group), handle(handle) {} + Group::GroupLock::GroupLock(Group& group, std::shared_ptr handle) + : group(group), handle(std::move(handle)) {} Group::GroupLock::~GroupLock() { // The notify targets may be trying to lock the group diff --git a/src/threading/scheduler/Group.hpp b/src/threading/scheduler/Group.hpp index ddb204b2..df2d4df9 100644 --- a/src/threading/scheduler/Group.hpp +++ b/src/threading/scheduler/Group.hpp @@ -53,7 +53,7 @@ namespace threading { LockHandle(const NUClear::id_t& task_id, const int& priority, const bool& locked, - const std::function& notify); + std::function notify); /** * Compare two lock handles by comparing their priority and task id