From a3443a3c5f76999888e7930910ce161ae3459c73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Sat, 2 May 2015 18:28:29 +0200 Subject: [PATCH] Fix compilation, remove some warnings. --- include/command.h | 2 +- include/option.h | 4 ++-- include/parameter.h | 2 +- src/main.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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; } -- 2.30.2