Skip to content

Commit

Permalink
ct
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Aug 9, 2024
1 parent 358bb52 commit dba56bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/threading/scheduler/Group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ namespace threading {
Group::LockHandle::LockHandle(const NUClear::id_t& task_id,
const int& priority,
const bool& locked,
const std::function<void()>& notify)
: task_id(task_id), priority(priority), locked(locked), notify(notify) {}
std::function<void()> notify)
: task_id(task_id), priority(priority), locked(locked), notify(std::move(notify)) {}

Group::GroupLock::GroupLock(Group& group, const std::shared_ptr<LockHandle>& handle)
: group(group), handle(handle) {}
Group::GroupLock::GroupLock(Group& group, std::shared_ptr<LockHandle> handle)
: group(group), handle(std::move(handle)) {}

Group::GroupLock::~GroupLock() {
// The notify targets may be trying to lock the group
Expand Down
2 changes: 1 addition & 1 deletion src/threading/scheduler/Group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace threading {
LockHandle(const NUClear::id_t& task_id,
const int& priority,
const bool& locked,
const std::function<void()>& notify);
std::function<void()> notify);

/**
* Compare two lock handles by comparing their priority and task id
Expand Down

0 comments on commit dba56bc

Please sign in to comment.