actions: use shared_ptr to store actions

This commit is contained in:
Andrzej Rybczak
2016-12-07 19:02:47 +01:00
parent 59197f23d0
commit 56cb940a12
8 changed files with 47 additions and 35 deletions

View File

@@ -40,13 +40,13 @@ private:
struct RequireRunnable: BaseAction
{
RequireRunnable(BaseAction *action);
RequireRunnable(std::shared_ptr<BaseAction> action);
private:
virtual bool canBeRun() override;
virtual void run() override { }
BaseAction *m_action;
std::shared_ptr<BaseAction> m_action;
};
struct RequireScreen: BaseAction
@@ -62,7 +62,7 @@ private:
struct RunExternalCommand: BaseAction
{
RunExternalCommand(std::string command);
RunExternalCommand(std::string &&command);
private:
virtual void run() override;