diff options
author | Sasha Smundak <asmundak@google.com> | 2016-07-29 13:46:25 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-07-29 16:02:22 +0000 |
commit | 0410957fde15927f7b9c9c6294020fcd099fad9c (patch) | |
tree | 5352f7fe8b9f0a7c1d16f2f8405cfcf44b285d8d /src/tools | |
parent | 490f250b27183a886cf70a5fe9e99d9428141b34 (diff) |
Fix Options::ParseCommandLine signature.
Otherwise the following code:
int main(int argc, char *argv[]) {
options.ParseCommandLine(argc-11, argv+1);
...
}
does not compile ("cannot convert from ‘char**’ to ‘const char**’")
--
MOS_MIGRATED_REVID=128803427
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/singlejar/options.cc | 2 | ||||
-rw-r--r-- | src/tools/singlejar/options.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/singlejar/options.cc b/src/tools/singlejar/options.cc index 2e33151ba8..7c609d82ca 100644 --- a/src/tools/singlejar/options.cc +++ b/src/tools/singlejar/options.cc @@ -17,7 +17,7 @@ #include "src/tools/singlejar/diag.h" #include "src/tools/singlejar/token_stream.h" -void Options::ParseCommandLine(int argc, const char *argv[]) { +void Options::ParseCommandLine(int argc, const char * const argv[]) { ArgTokenStream tokens(argc, argv); std::string optarg; while (!tokens.AtEnd()) { diff --git a/src/tools/singlejar/options.h b/src/tools/singlejar/options.h index 74de3a4790..7cf3f2aa13 100644 --- a/src/tools/singlejar/options.h +++ b/src/tools/singlejar/options.h @@ -31,7 +31,7 @@ class Options { warn_duplicate_resources(false) {} // Parses command line arguments into the fields of this instance. - void ParseCommandLine(int argc, const char *argv[]); + void ParseCommandLine(int argc, const char * const argv[]); std::string output_jar; std::string main_class; |