actions: use shared_ptr to store actions
This commit is contained in:
@@ -46,9 +46,9 @@ void PushCharacters::run()
|
||||
(*m_window)->pushChar(*it);
|
||||
}
|
||||
|
||||
RequireRunnable::RequireRunnable(BaseAction *action)
|
||||
RequireRunnable::RequireRunnable(std::shared_ptr<BaseAction> action)
|
||||
: BaseAction(Type::MacroUtility, "require_runnable")
|
||||
, m_action(action)
|
||||
, m_action(std::move(action))
|
||||
{
|
||||
assert(m_action != nullptr);
|
||||
m_name += " \"";
|
||||
@@ -75,7 +75,7 @@ bool RequireScreen::canBeRun()
|
||||
return Global::myScreen->type() == m_screen_type;
|
||||
}
|
||||
|
||||
RunExternalCommand::RunExternalCommand(std::string command)
|
||||
RunExternalCommand::RunExternalCommand(std::string &&command)
|
||||
: BaseAction(Type::MacroUtility, "run_external_command")
|
||||
, m_command(std::move(command))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user