diff options
author | Pavel Belikov <pavel.fuchs.belikov@gmail.com> | 2017-12-23 21:33:19 +0300 |
---|---|---|
committer | Pavel Belikov <pavel.fuchs.belikov@gmail.com> | 2017-12-23 21:33:19 +0300 |
commit | 32a103d5b530c4cf0709e02f2c893c752c9e3c97 (patch) | |
tree | 34bf8ac80e4d24b7a3dd5085a28fdac92117912f | |
parent | remove ParseValue for completion (diff) | |
download | args.hxx-32a103d5b530c4cf0709e02f2c893c752c9e3c97.tar.xz |
fix warnings
-rw-r--r-- | args.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2516,9 +2516,9 @@ namespace args auto &matcher = flag->GetMatcher(); if (!AddCompletionReply(chunk, matcher.GetShortOrAny().str(shortprefix, longprefix))) { - for (auto &name : matcher.GetFlagStrings()) + for (auto &flagName : matcher.GetFlagStrings()) { - if (AddCompletionReply(chunk, name.str(shortprefix, longprefix))) + if (AddCompletionReply(chunk, flagName.str(shortprefix, longprefix))) { break; } @@ -2544,13 +2544,13 @@ namespace args { if (chunk.size() > shortprefix.size() + 1) { - auto name = chunk.at(shortprefix.size()); + auto arg = chunk.at(shortprefix.size()); //TODO: support -abcVALUE where a and b take no value - if (auto flag = this->Match(name)) + if (auto flag = this->Match(arg)) { for (auto &choice : flag->HelpChoices(helpParams)) { - AddCompletionReply(chunk, shortprefix + name + choice); + AddCompletionReply(chunk, shortprefix + arg + choice); } } } @@ -2708,7 +2708,7 @@ namespace args Parse(curArgs.begin(), curArgs.end()); throw Completion(""); } - catch (Completion &e) + catch (Completion &) { throw; } |