diff options
author | Evan Martin <martine@danga.com> | 2011-09-22 17:38:56 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-09-22 17:38:56 (GMT) |
commit | e78a69ef9c77b15990d919b8e62946c9b321a96b (patch) | |
tree | f5c976f46ceb2ce6cf153f874ef13500bc0eacb8 /src | |
parent | 2d766772aadeca3bc78c4d5b636cad2ad76f7841 (diff) | |
download | Ninja-e78a69ef9c77b15990d919b8e62946c9b321a96b.zip Ninja-e78a69ef9c77b15990d919b8e62946c9b321a96b.tar.gz Ninja-e78a69ef9c77b15990d919b8e62946c9b321a96b.tar.bz2 |
make options const
Diffstat (limited to 'src')
-rw-r--r-- | src/ninja.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index 57d5904..58580a6 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -44,11 +44,6 @@ namespace { -option options[] = { - { "help", no_argument, NULL, 'h' }, - { } -}; - /// Print usage information. void Usage(const BuildConfig& config) { fprintf(stderr, @@ -376,8 +371,13 @@ int main(int argc, char** argv) { config.parallelism = GuessParallelism(); + const option kLongOptions[] = { + { "help", no_argument, NULL, 'h' }, + { } + }; + int opt; - while ((opt = getopt_long(argc, argv, "f:hj:k:nt:vC:", options, + while ((opt = getopt_long(argc, argv, "f:hj:k:nt:vC:", kLongOptions, NULL)) != -1) { switch (opt) { case 'f': |