diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-12 17:35:33 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-12 17:43:05 -0800 |
| commit | df2a05e8546281135c6ea12430734d74371bcf46 (patch) | |
| tree | f64c97d48fbcb506def9b089cc4311736dcf08de /toolsrc/src/main.cpp | |
| parent | 4c51e65d5004311c7c7ba0687e7dba934ba986c1 (diff) | |
| download | vcpkg-df2a05e8546281135c6ea12430734d74371bcf46.tar.gz vcpkg-df2a05e8546281135c6ea12430734d74371bcf46.zip | |
Introduce Command namespace. Refactoring
Diffstat (limited to 'toolsrc/src/main.cpp')
| -rw-r--r-- | toolsrc/src/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/toolsrc/src/main.cpp b/toolsrc/src/main.cpp index 7703c541f..8490dc81b 100644 --- a/toolsrc/src/main.cpp +++ b/toolsrc/src/main.cpp @@ -21,7 +21,7 @@ bool g_debugging = false; void invalid_command(const std::string& cmd) { System::println(System::color::error, "invalid command: %s", cmd); - print_usage(); + Commands::Helpers::print_usage(); exit(EXIT_FAILURE); } @@ -30,11 +30,11 @@ static void inner(const vcpkg_cmd_arguments& args) TrackProperty("command", args.command); if (args.command.empty()) { - print_usage(); + Commands::Helpers::print_usage(); exit(EXIT_FAILURE); } - if (auto command_function = find_command(args.command, get_available_commands_type_c())) + if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_c())) { return command_function(args); } @@ -66,7 +66,7 @@ static void inner(const vcpkg_cmd_arguments& args) int exit_code = _wchdir(paths.root.c_str()); Checks::check_exit(exit_code == 0, "Changing the working dir failed"); - if (auto command_function = find_command(args.command, get_available_commands_type_b())) + if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_b())) { return command_function(args, paths); } @@ -91,7 +91,7 @@ static void inner(const vcpkg_cmd_arguments& args) Input::check_triplet(default_target_triplet, paths); - if (auto command_function = find_command(args.command, get_available_commands_type_a())) + if (auto command_function = Commands::find(args.command, Commands::get_available_commands_type_a())) { return command_function(args, paths, default_target_triplet); } |
