diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index b7e981b41..9ba423a08 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -8,9 +8,9 @@ namespace vcpkg::Commands { - using command_type_a = void(*)(const VcpkgCmdArguments& args, const vcpkg_paths& paths, const Triplet& default_target_triplet); - using command_type_b = void(*)(const VcpkgCmdArguments& args, const vcpkg_paths& paths); - using command_type_c = void(*)(const VcpkgCmdArguments& args); + using CommandTypeA = void(*)(const VcpkgCmdArguments& args, const vcpkg_paths& paths, const Triplet& default_target_triplet); + using CommandTypeB = void(*)(const VcpkgCmdArguments& args, const vcpkg_paths& paths); + using CommandTypeC = void(*)(const VcpkgCmdArguments& args); namespace Build { @@ -160,9 +160,9 @@ namespace vcpkg::Commands T function; }; - const std::vector>& get_available_commands_type_a(); - const std::vector>& get_available_commands_type_b(); - const std::vector>& get_available_commands_type_c(); + const std::vector>& get_available_commands_type_a(); + const std::vector>& get_available_commands_type_b(); + const std::vector>& get_available_commands_type_c(); template T find(const std::string& command_name, const std::vector> available_commands) diff --git a/toolsrc/src/commands_available_commands.cpp b/toolsrc/src/commands_available_commands.cpp index 70e528704..45ece8ed9 100644 --- a/toolsrc/src/commands_available_commands.cpp +++ b/toolsrc/src/commands_available_commands.cpp @@ -3,9 +3,9 @@ namespace vcpkg::Commands { - const std::vector>& get_available_commands_type_a() + const std::vector>& get_available_commands_type_a() { - static std::vector> t = { + static std::vector> t = { {"install", &Install::perform_and_exit}, { "ci", &CI::perform_and_exit }, {"remove", &Remove::perform_and_exit}, @@ -16,9 +16,9 @@ namespace vcpkg::Commands return t; } - const std::vector>& get_available_commands_type_b() + const std::vector>& get_available_commands_type_b() { - static std::vector> t = { + static std::vector> t = { {"/?", &Help::perform_and_exit}, {"help", &Help::perform_and_exit}, {"search", &Search::perform_and_exit}, @@ -35,9 +35,9 @@ namespace vcpkg::Commands return t; } - const std::vector>& get_available_commands_type_c() + const std::vector>& get_available_commands_type_c() { - static std::vector> t = { + static std::vector> t = { {"version", &Version::perform_and_exit}, {"contact", &Contact::perform_and_exit}, {"hash", &Hash::perform_and_exit},