Commit 983993fc14888568dd17eb951590bd83a7c682ff
Committed by
Henry Schreiner
1 parent
9359f642
Removing some appveyor warnings
Showing
3 changed files
with
10 additions
and
9 deletions
.appveyor.yml
| @@ -9,11 +9,11 @@ install: | @@ -9,11 +9,11 @@ install: | ||
| 9 | build_script: | 9 | build_script: |
| 10 | - mkdir build | 10 | - mkdir build |
| 11 | - cd build | 11 | - cd build |
| 12 | - - cmake .. -DCLI_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_GENERATOR="Visual Studio 14 2015" | 12 | + - cmake .. -DCLI_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_GENERATOR="Visual Studio 14 2015" |
| 13 | - cmake --build . | 13 | - cmake --build . |
| 14 | 14 | ||
| 15 | test_script: | 15 | test_script: |
| 16 | - - ctest --output-on-failure -C RelWithDebInfo | 16 | + - ctest --output-on-failure -C Debug |
| 17 | 17 | ||
| 18 | notifications: | 18 | notifications: |
| 19 | - provider: Webhook | 19 | - provider: Webhook |
include/CLI/App.hpp
| @@ -910,9 +910,9 @@ class App { | @@ -910,9 +910,9 @@ class App { | ||
| 910 | 910 | ||
| 911 | subcmd_groups_seen.insert(group_key); | 911 | subcmd_groups_seen.insert(group_key); |
| 912 | out << std::endl << com->get_group() << ":" << std::endl; | 912 | out << std::endl << com->get_group() << ":" << std::endl; |
| 913 | - for(const App_p &com : subcommands_) | ||
| 914 | - if(detail::to_lower(com->get_group()) == group_key) | ||
| 915 | - detail::format_help(out, com->get_name(), com->description_, wid); | 913 | + for(const App_p &new_com : subcommands_) |
| 914 | + if(detail::to_lower(new_com->get_group()) == group_key) | ||
| 915 | + detail::format_help(out, new_com->get_name(), new_com->description_, wid); | ||
| 916 | } | 916 | } |
| 917 | } | 917 | } |
| 918 | 918 |
include/CLI/Option.hpp
| @@ -408,17 +408,18 @@ class Option : public OptionBase<Option> { | @@ -408,17 +408,18 @@ class Option : public OptionBase<Option> { | ||
| 408 | 408 | ||
| 409 | /// Process the callback | 409 | /// Process the callback |
| 410 | void run_callback() const { | 410 | void run_callback() const { |
| 411 | - bool result; | 411 | + bool local_result; |
| 412 | // If take_last, only operate on the final item | 412 | // If take_last, only operate on the final item |
| 413 | if(last_) { | 413 | if(last_) { |
| 414 | results_t partial_result = {results_.back()}; | 414 | results_t partial_result = {results_.back()}; |
| 415 | - result = !callback_(partial_result); | 415 | + local_result = !callback_(partial_result); |
| 416 | } else { | 416 | } else { |
| 417 | - result = !callback_(results_); | 417 | + local_result = !callback_(results_); |
| 418 | } | 418 | } |
| 419 | 419 | ||
| 420 | - if(result) | 420 | + if(local_result) |
| 421 | throw ConversionError(get_name() + "=" + detail::join(results_)); | 421 | throw ConversionError(get_name() + "=" + detail::join(results_)); |
| 422 | + | ||
| 422 | if(!validators_.empty()) { | 423 | if(!validators_.empty()) { |
| 423 | for(const std::string &result : results_) | 424 | for(const std::string &result : results_) |
| 424 | for(const std::function<bool(std::string)> &vali : validators_) | 425 | for(const std::function<bool(std::string)> &vali : validators_) |