From: Rafał Długołęcki Date: Sat, 2 May 2015 16:28:29 +0000 (+0200) Subject: Fix compilation, remove some warnings. X-Git-Tag: v0.2~33 X-Git-Url: https://git.dlugolecki.net.pl/?p=command.git;a=commitdiff_plain;h=a3443a3c5f76999888e7930910ce161ae3459c73 Fix compilation, remove some warnings. --- diff --git a/include/command.h b/include/command.h index 00e8b07..0c18cdf 100644 --- a/include/command.h +++ b/include/command.h @@ -42,7 +42,7 @@ namespace command { /** * Matches user passed arguments with available parameter handlers. */ - void matchArguments(unsigned int argc, char *argv[]) { + void matchArguments(unsigned int , char **) { // param->passUserValue(); } diff --git a/include/option.h b/include/option.h index 3cba30f..be65e77 100644 --- a/include/option.h +++ b/include/option.h @@ -31,7 +31,7 @@ namespace command { * @param function Function used to handle current Option. */ Option(std::string name, std::string description, void (*function)(OptionType)) - : Parameter(description), Callable(function) { + : Parameter(description), Callable(function), name(name) { } virtual ~Option() { } @@ -39,7 +39,7 @@ namespace command { this->call(std::string("O")); } - virtual bool understand(std::string argVal) { + virtual bool understand(const std::string & argVal) { if (argVal.find(name) != std::string::npos) { return true; } diff --git a/include/parameter.h b/include/parameter.h index 3f5cfaa..ed79218 100644 --- a/include/parameter.h +++ b/include/parameter.h @@ -35,7 +35,7 @@ namespace command { * Method used for checking if the given user value understandable for * parameter. */ - virtual bool understand(std::string argVal) = 0; + virtual bool understand(const std::string & ) = 0; }; } diff --git a/src/main.cpp b/src/main.cpp index 1cc8387..6365c7f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,7 +5,7 @@ #include "argument.h" #include "command.h" -void some_function(std::string str) { +void some_function(std::string) { std::cout << "Some function" << std::endl; }