Commit 4b07ef52d5d8ce49abda6b13a1b3015c1a512064

Authored by Henry Fredrick Schreiner
1 parent e328364a

Fixes for Windows warnings

CMakeLists.txt
@@ -19,6 +19,7 @@ if(CMAKE_COMPILER_IS_GNUCC) @@ -19,6 +19,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
19 endif() 19 endif()
20 if(MSVC) 20 if(MSVC)
21 add_definitions("/W4") 21 add_definitions("/W4")
  22 + add_definitions(-D_CRT_SECURE_NO_WARNINGS)
22 endif() 23 endif()
23 24
24 add_library(CLI INTERFACE) 25 add_library(CLI INTERFACE)
include/CLI/App.hpp
@@ -519,9 +519,9 @@ public: @@ -519,9 +519,9 @@ public:
519 } 519 }
520 520
521 /// Check with name instead of pointer 521 /// Check with name instead of pointer
522 - bool got_subcommand(std::string name) const { 522 + bool got_subcommand(std::string name_) const {
523 for(const auto subcomptr : selected_subcommands) 523 for(const auto subcomptr : selected_subcommands)
524 - if(subcomptr->check_name(name)) 524 + if(subcomptr->check_name(name_))
525 return true; 525 return true;
526 return false; 526 return false;
527 } 527 }
@@ -630,7 +630,7 @@ protected: @@ -630,7 +630,7 @@ protected:
630 // Collect positionals 630 // Collect positionals
631 631
632 // Loop over all positionals 632 // Loop over all positionals
633 - for(int i=0; i<missing.size(); i++) { 633 + for(size_t i=0; i<missing.size(); i++) {
634 634
635 // Skip non-positionals (speedup) 635 // Skip non-positionals (speedup)
636 if(missing.at(i).first != detail::Classifer::NONE) 636 if(missing.at(i).first != detail::Classifer::NONE)