diff --git a/cmdopt.cpp b/cmdopt.cpp index fded38b4..341161ed 100644 --- a/cmdopt.cpp +++ b/cmdopt.cpp @@ -195,7 +195,7 @@ namespace util { namespace cmdopt { namespace option { /////////////////////////////////////////////////////////////////////////////// int -parser::scan (int argc, char *const *argv) +parser::scan (int argc, const char *const *argv) { CHECK_GE (argc, 0); CHECK (argv); @@ -230,7 +230,7 @@ parser::scan (int argc, char *const *argv) //----------------------------------------------------------------------------- int -parser::parse_long (int pos, int argc, char *const *argv) +parser::parse_long (int pos, int argc, const char *const *argv) { CHECK_LT (pos, argc); CHECK_GE (pos, 0); @@ -276,7 +276,7 @@ parser::parse_long (int pos, int argc, char *const *argv) //----------------------------------------------------------------------------- int -parser::parse_short (int pos, int argc, char *const *argv) +parser::parse_short (int pos, int argc, const char *const *argv) { CHECK_LT (pos, argc); CHECK_GE (pos, 0); diff --git a/cmdopt.hpp b/cmdopt.hpp index c57651e6..9a77cb09 100644 --- a/cmdopt.hpp +++ b/cmdopt.hpp @@ -134,11 +134,11 @@ namespace util { namespace cmdopt { std::string description, Args&&...); - int scan (int argc, char *const *argv); + int scan (int argc, const char *const *argv); private: - int parse_long (int pos, int argc, char *const *argv); - int parse_short (int pos, int argc, char *const *argv); + int parse_long (int pos, int argc, const char *const *argv); + int parse_short (int pos, int argc, const char *const *argv); using short_t = std::tuple;