Conversation
Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Yadunund <[email protected]>
mxgrey
left a comment
There was a problem hiding this comment.
This looks really great! I just left a few nitpicks, but none of them are blockers.
rmf_task_sequence/include/rmf_task_sequence/events/PerformAction.hpp
Outdated
Show resolved
Hide resolved
rmf_task_sequence/src/rmf_task_sequence/events/PerformAction.cpp
Outdated
Show resolved
Hide resolved
| auto PerformAction::Description::use_tool_sink( | ||
| bool use_tool) -> Description& | ||
| { | ||
| _pimpl->use_tool_sink = std::move(use_tool); |
There was a problem hiding this comment.
Not really important, but just a remark: Moving a primitive type like bool doesn't really do anything special compared to copying it. Either way it will perform a copy.
Moving only matters when one or more fields are heap-allocated objects whose copy operators perform a deep copy, like std::vector or std::[unordered_]map. Or objects whose copy operator has side effects, like std::shared_ptr's copy operation increments a reference count while its move operation doesn't. Or most importantly objects that don't offer a copy operator like std::unique_ptr.
Using move here doesn't hurt anything, but I thought it would be good to share the above info.
There was a problem hiding this comment.
Thanks for the explanation; very helpful 👍🏼
Signed-off-by: Yadunund <[email protected]>
Signed-off-by: Yadunund <[email protected]>
Cherry picked the description introduced here #46