diff options
author | William A. Kennington III <wak@google.com> | 2018-01-29 12:09:29 -0800 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2018-01-29 12:10:05 -0800 |
commit | 6c094a2d22c7c9e4452b20ab0e42351be84d7e2d (patch) | |
tree | b4037ab89e38eff14453e260b09467cb6b3dbfbf | |
parent | e2aab94bd5284496c7ac0547d358c34ea8032220 (diff) | |
download | phosphor-watchdog-6c094a2d22c7c9e4452b20ab0e42351be84d7e2d.tar.gz phosphor-watchdog-6c094a2d22c7c9e4452b20ab0e42351be84d7e2d.zip |
argument: Clean up argv types to match standard definitions
Change-Id: Idabdaac7b7a3879d6a2e18e46df986a1543df48f
Signed-off-by: William A. Kennington III <wak@google.com>
-rw-r--r-- | argument.cpp | 4 | ||||
-rw-r--r-- | argument.hpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/argument.cpp b/argument.cpp index 8931969..ed74a9d 100644 --- a/argument.cpp +++ b/argument.cpp @@ -39,7 +39,7 @@ const option ArgumentParser::options[] = { 0, 0, 0, 0}, }; -ArgumentParser::ArgumentParser(int argc, char** argv) +ArgumentParser::ArgumentParser(int argc, char * const argv[]) { int option = 0; @@ -83,7 +83,7 @@ const std::string& ArgumentParser::operator[](const std::string& opt) } } -void ArgumentParser::usage(char** argv) +void ArgumentParser::usage(char * const argv[]) { std::cerr << "Usage: " << argv[0] << " options\n"; std::cerr << "Options:\n"; diff --git a/argument.hpp b/argument.hpp index 29993d6..ee9e8c8 100644 --- a/argument.hpp +++ b/argument.hpp @@ -27,7 +27,7 @@ class ArgumentParser * @param argv - the main function's argv passed as is * @return Object constructed */ - ArgumentParser(int argc, char** argv); + ArgumentParser(int argc, char * const argv[]); /** @brief Given an option, returns its argument(optarg) * @@ -41,7 +41,7 @@ class ArgumentParser * * @param argv - the main function's argv passed as is */ - static void usage(char** argv); + static void usage(char * const argv[]); /** @brief Set to 'true' when an option is passed */ static const std::string trueString; |