diff --git a/CMakeLists.txt b/CMakeLists.txt index bc6e14b8..b8d4f569 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ if(CMAKE_COMPILER_IS_GNUCC) endif() if(MSVC) add_definitions("/W4") + add_definitions(-D_CRT_SECURE_NO_WARNINGS) endif() add_library(CLI INTERFACE) diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index 5e4d510e..c8c0ca91 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -519,9 +519,9 @@ public: } /// Check with name instead of pointer - bool got_subcommand(std::string name) const { + bool got_subcommand(std::string name_) const { for(const auto subcomptr : selected_subcommands) - if(subcomptr->check_name(name)) + if(subcomptr->check_name(name_)) return true; return false; } @@ -630,7 +630,7 @@ protected: // Collect positionals // Loop over all positionals - for(int i=0; i