Skip to content

Commit

Permalink
Merge pull request #81 from ikbuibui/pessimizing_moves
Browse files Browse the repository at this point in the history
Remove pessimizing moves
  • Loading branch information
ikbuibui authored Jul 24, 2024
2 parents 94c28d3 + 30945ed commit 8be11e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion redGrapes/redGrapes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ namespace redGrapes
// construct task in-place
new(task) FunTask<Impl, RGTask>(worker_id, *scheduler_map[TSchedTag{}]);

return std::move(TaskBuilder<RGTask, Callable, Args...>(task, std::move(f), std::forward<Args>(args)...));
return TaskBuilder<RGTask, Callable, Args...>(task, std::forward<Callable>(f), std::forward<Args>(args)...);
}

template<typename Callable, typename... Args>
Expand Down
2 changes: 1 addition & 1 deletion redGrapes/task/task_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ namespace redGrapes
space->submit(t);
t->scheduler_p->emplace_task(*t);

return std::move(Future<Result, TTask>(*t));
return Future<Result, TTask>(*t);
}

auto get()
Expand Down
2 changes: 1 addition & 1 deletion redGrapes/util/bind_args.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ struct BindArgs
{
inline auto operator()(Callable&& f, Args&&... args)
{
return std::move([f = std::move(f), args...]() mutable { return f(std::forward<Args>(args)...); });
return [f = std::move(f), args...]() mutable { return f(std::forward<Args>(args)...); };
}
};

0 comments on commit 8be11e9

Please sign in to comment.