From b0f046461b44a0c4002ea667a726403ff4a1a701 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 4 May 2022 10:58:48 +0300 Subject: Moved templated stuff into hpp files and added a blank main.cpp file --- src/ConsoleInterface/Command.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ConsoleInterface/Command.cpp') diff --git a/src/ConsoleInterface/Command.cpp b/src/ConsoleInterface/Command.cpp index da8915f..d3d058c 100644 --- a/src/ConsoleInterface/Command.cpp +++ b/src/ConsoleInterface/Command.cpp @@ -1,13 +1,16 @@ #include "Command.h" #include +Command::Command() : Command("", nullptr) {} + Command::Command(const char* nameInMenu, void (*exec)()) { strcpy(this->nameInMenu, nameInMenu); this->exec = exec; } void Command::run() const { - exec(); + if (exec != nullptr) + exec(); } const char* Command::get_nameInMenu() const { -- cgit v1.3.1-23-gd82d