Commit 983993fc14888568dd17eb951590bd83a7c682ff

Authored by Henry Fredrick Schreiner
Committed by Henry Schreiner
1 parent 9359f642

Removing some appveyor warnings

.appveyor.yml
... ... @@ -9,11 +9,11 @@ install:
9 9 build_script:
10 10 - mkdir build
11 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 13 - cmake --build .
14 14  
15 15 test_script:
16   - - ctest --output-on-failure -C RelWithDebInfo
  16 + - ctest --output-on-failure -C Debug
17 17  
18 18 notifications:
19 19 - provider: Webhook
... ...
include/CLI/App.hpp
... ... @@ -910,9 +910,9 @@ class App {
910 910  
911 911 subcmd_groups_seen.insert(group_key);
912 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&lt;Option&gt; {
408 408  
409 409 /// Process the callback
410 410 void run_callback() const {
411   - bool result;
  411 + bool local_result;
412 412 // If take_last, only operate on the final item
413 413 if(last_) {
414 414 results_t partial_result = {results_.back()};
415   - result = !callback_(partial_result);
  415 + local_result = !callback_(partial_result);
416 416 } else {
417   - result = !callback_(results_);
  417 + local_result = !callback_(results_);
418 418 }
419 419  
420   - if(result)
  420 + if(local_result)
421 421 throw ConversionError(get_name() + "=" + detail::join(results_));
  422 +
422 423 if(!validators_.empty()) {
423 424 for(const std::string &result : results_)
424 425 for(const std::function<bool(std::string)> &vali : validators_)
... ...