mirror of
https://github.com/lucaspalomodevelop/autom.git
synced 2026-03-12 23:27:21 +00:00
std::string consistency
This commit is contained in:
parent
5257f19bc2
commit
5043a2f870
@ -30,7 +30,7 @@ void Command::addDefaultCommand(void (*func)(int argc, char *argv[]))
|
||||
}
|
||||
|
||||
// run a command
|
||||
void Command::runCommand(char *name, int argc, char *argv[])
|
||||
void Command::runCommand(std::string name, int argc, char *argv[])
|
||||
{
|
||||
// std::cout << "Running command: " << name << std::endl;
|
||||
if (this->isInCommands(name))
|
||||
@ -50,7 +50,7 @@ void Command::runCommand(char *name, int argc, char *argv[])
|
||||
}
|
||||
|
||||
// check if a command is in the command map
|
||||
bool Command::isInCommands(char *name)
|
||||
bool Command::isInCommands(std::string name)
|
||||
{
|
||||
for (auto const &command : commands)
|
||||
{
|
||||
|
||||
@ -25,9 +25,9 @@ public:
|
||||
// add a default command to the command map
|
||||
void addDefaultCommand(void (*func)(int argc, char *argv[]));
|
||||
// run a command
|
||||
void runCommand(char *name, int argc, char *argv[]);
|
||||
void runCommand(std::string name, int argc, char *argv[]);
|
||||
// check if a command is in the command map
|
||||
bool isInCommands(char *name);
|
||||
bool isInCommands(std::string name);
|
||||
|
||||
std::string listCommands();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user