X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=include%2Fargument.h;h=bf5fc3354f304c7b894252069969451275ec7fff;hb=e8acdc5555d6e3e726ba689eb0454b870deb5871;hp=80deabb9c22f903aa4f518b89dc940342b179d23;hpb=95af563cb577e8eedc95c0664a6529d12ea050ed;p=command.git diff --git a/include/argument.h b/include/argument.h index 80deabb..bf5fc33 100644 --- a/include/argument.h +++ b/include/argument.h @@ -4,6 +4,7 @@ #include #include #include +#include #include "parameter.h" #include "callable.h" @@ -31,7 +32,7 @@ namespace command { * @param description Description of current Argument * @param function Function used to handle current Argument. */ - Argument(const std::string & description, void (*function)(ParameterType)) + Argument(const std::string & description, std::function function) : Parameter(description), Callable(function) { } @@ -67,7 +68,7 @@ namespace command { virtual bool understand(const std::string & argv) { std::stringstream ss; - ss << argv; + ss << std::fixed << argv; ss >> value; if (!ss.fail()) {