From b629cd904440c640b7e5b4c3fdf17df5aac90bad Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 12 Dec 2016 15:03:36 -0800 Subject: [vcpkg_cmd_arguments] Use std::string instead of char* --- toolsrc/src/commands_create.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolsrc/src/commands_create.cpp') diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp index d1611eb5c..ad00cd676 100644 --- a/toolsrc/src/commands_create.cpp +++ b/toolsrc/src/commands_create.cpp @@ -9,8 +9,8 @@ namespace vcpkg void create_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { static const std::string example = create_example_string(R"###(create zlib2 http://zlib.net/zlib128.zip "zlib128-2.zip")###"); - args.check_max_arg_count(3, example.c_str()); - args.check_min_arg_count(2, example.c_str()); + args.check_max_arg_count(3, example); + args.check_min_arg_count(2, example); const std::string port_name = args.command_arguments.at(0); Environment::ensure_utilities_on_path(paths); -- cgit v1.2.3 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_create.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolsrc/src/commands_create.cpp') diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp index ad00cd676..2fcd85dba 100644 --- a/toolsrc/src/commands_create.cpp +++ b/toolsrc/src/commands_create.cpp @@ -4,11 +4,11 @@ #include "vcpkg_Files.h" #include "vcpkg_Input.h" -namespace vcpkg +namespace vcpkg::Commands { void create_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { - static const std::string example = create_example_string(R"###(create zlib2 http://zlib.net/zlib128.zip "zlib128-2.zip")###"); + static const std::string example = Commands::Helpers::create_example_string(R"###(create zlib2 http://zlib.net/zlib128.zip "zlib128-2.zip")###"); args.check_max_arg_count(3, example); args.check_min_arg_count(2, example); -- 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_create.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toolsrc/src/commands_create.cpp') diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp index 2fcd85dba..d842d3fab 100644 --- a/toolsrc/src/commands_create.cpp +++ b/toolsrc/src/commands_create.cpp @@ -4,11 +4,11 @@ #include "vcpkg_Files.h" #include "vcpkg_Input.h" -namespace vcpkg::Commands +namespace vcpkg::Commands::Create { - void create_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) + void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { - static const std::string example = Commands::Helpers::create_example_string(R"###(create zlib2 http://zlib.net/zlib128.zip "zlib128-2.zip")###"); + static const std::string example = Commands::Help::create_example_string(R"###(create zlib2 http://zlib.net/zlib128.zip "zlib128-2.zip")###"); args.check_max_arg_count(3, example); args.check_min_arg_count(2, example); -- cgit v1.2.3 From 050e4a0f7a8156bd862f95c06ea298ab6697e147 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Jan 2017 12:49:09 -0800 Subject: Introduce precompiled headers --- toolsrc/src/commands_create.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'toolsrc/src/commands_create.cpp') diff --git a/toolsrc/src/commands_create.cpp b/toolsrc/src/commands_create.cpp index d842d3fab..5042ab97b 100644 --- a/toolsrc/src/commands_create.cpp +++ b/toolsrc/src/commands_create.cpp @@ -1,3 +1,4 @@ +#include "pch.h" #include "vcpkg_Commands.h" #include "vcpkg_System.h" #include "vcpkg_Environment.h" -- cgit v1.2.3