From df2a05e8546281135c6ea12430734d74371bcf46 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 12 Jan 2017 17:35:33 -0800 Subject: Introduce Command namespace. Refactoring --- toolsrc/src/commands_remove.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolsrc/src/commands_remove.cpp') diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index 445213fc2..16e8687e7 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -4,7 +4,7 @@ #include "vcpkg_Input.h" #include -namespace vcpkg +namespace vcpkg::Commands { static const std::string OPTION_PURGE = "--purge"; @@ -168,7 +168,7 @@ namespace vcpkg void remove_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet) { - static const std::string example = create_example_string("remove zlib zlib:x64-windows curl boost"); + static const std::string example = Commands::Helpers::create_example_string("remove zlib zlib:x64-windows curl boost"); args.check_min_arg_count(1, example); const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_PURGE}); -- cgit v1.2.3 From cc8851144a871931b93d84bd962364159ad1c424 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 12 Jan 2017 22:03:57 -0800 Subject: Reorganize commands, each in its own namespace Additionally, functions related to a command can now live in the same namespace --- toolsrc/src/commands_remove.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toolsrc/src/commands_remove.cpp') diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp index 16e8687e7..23d981fc1 100644 --- a/toolsrc/src/commands_remove.cpp +++ b/toolsrc/src/commands_remove.cpp @@ -4,7 +4,7 @@ #include "vcpkg_Input.h" #include -namespace vcpkg::Commands +namespace vcpkg::Commands::Remove { static const std::string OPTION_PURGE = "--purge"; @@ -166,9 +166,9 @@ namespace vcpkg::Commands System::println(System::color::success, "Package %s was successfully removed", pkg.package.displayname()); } - void remove_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet) + void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet) { - static const std::string example = Commands::Helpers::create_example_string("remove zlib zlib:x64-windows curl boost"); + static const std::string example = Commands::Help::create_example_string("remove zlib zlib:x64-windows curl boost"); args.check_min_arg_count(1, example); const std::unordered_set options = args.check_and_get_optional_command_arguments({OPTION_PURGE}); -- cgit v1.2.3