diff options
author | Kjetil Andresen <kjetil.andrese@gmail.com> | 2020-08-11 01:01:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 01:01:29 +0300 |
commit | 15e8a74e95ac0f1c45068f5db8ea31776d946b30 (patch) | |
tree | 1ee7903f065a9beeb184886e08834feff28c5fb2 /src | |
parent | 07f5cb24f1d75aad6c27eafd83863a78a37f16cb (diff) |
Support 'const char**' arguments in Options::parse (#250)
`cxxopts` doesn't modify the contents of the argv strings. This changes
the parse function to take a reference to a `const char**`.
Diffstat (limited to 'src')
-rw-r--r-- | src/example.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/example.cpp b/src/example.cpp index 9b6ea88..0efb3a4 100644 --- a/src/example.cpp +++ b/src/example.cpp @@ -27,7 +27,7 @@ THE SOFTWARE. #include "cxxopts.hpp" void -parse(int argc, char* argv[]) +parse(int argc, const char* argv[]) { try { @@ -160,7 +160,7 @@ parse(int argc, char* argv[]) } } -int main(int argc, char* argv[]) +int main(int argc, const char* argv[]) { parse(argc, argv); |