[commands] Enhance Command Sendable implementations (#4822)

This commit is contained in:
Starlight220
2022-12-16 04:28:52 +02:00
committed by GitHub
parent 7713f68772
commit fbabd0ef15
33 changed files with 239 additions and 17 deletions

View File

@@ -221,8 +221,9 @@ CommandPtr CommandPtr::HandleInterrupt(std::function<void(void)> handler) && {
CommandPtr CommandPtr::WithName(std::string_view name) && {
AssertValid();
m_ptr->SetName(name);
return std::move(*this);
WrapperCommand wrapper{std::move(m_ptr)};
wrapper.SetName(name);
return std::move(wrapper).ToPtr();
}
CommandBase* CommandPtr::get() const {