diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-12-12 15:13:24 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-12-12 15:13:24 -0800 |
| commit | e523668cce29745d8024dd5d56ee1d705da24a49 (patch) | |
| tree | 7510bb9f784336733fed9a4e79b51a27e13c77e7 | |
| parent | 9796e2532cc34896e38a6c0702e538454ffb5586 (diff) | |
| download | vcpkg-e523668cce29745d8024dd5d56ee1d705da24a49.tar.gz vcpkg-e523668cce29745d8024dd5d56ee1d705da24a49.zip | |
Change signature to std::string& (from char*)
| -rw-r--r-- | toolsrc/include/vcpkg_Commands.h | 4 | ||||
| -rw-r--r-- | toolsrc/src/commands_installation.cpp | 2 | ||||
| -rw-r--r-- | toolsrc/src/commands_other.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h index 8272929a7..fd427fd40 100644 --- a/toolsrc/include/vcpkg_Commands.h +++ b/toolsrc/include/vcpkg_Commands.h @@ -8,8 +8,8 @@ namespace vcpkg extern const char*const INTEGRATE_COMMAND_HELPSTRING; void print_usage(); - void print_example(const char* command_and_arguments); - std::string create_example_string(const char* command_and_arguments); + void print_example(const std::string& command_and_arguments); + std::string create_example_string(const std::string& command_and_arguments); void update_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths); void build_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet); diff --git a/toolsrc/src/commands_installation.cpp b/toolsrc/src/commands_installation.cpp index c7bac3fc1..fd318d2e7 100644 --- a/toolsrc/src/commands_installation.cpp +++ b/toolsrc/src/commands_installation.cpp @@ -349,7 +349,7 @@ namespace vcpkg } System::println(System::color::error, "Error: %s: %s", maybe_current_spec.error_code().message(), args.command_arguments[0]); - print_example(Strings::format("%s zlib:x64-windows", args.command).c_str()); + print_example(Strings::format("%s zlib:x64-windows", args.command)); exit(EXIT_FAILURE); } } diff --git a/toolsrc/src/commands_other.cpp b/toolsrc/src/commands_other.cpp index 16b697952..6df325100 100644 --- a/toolsrc/src/commands_other.cpp +++ b/toolsrc/src/commands_other.cpp @@ -41,14 +41,14 @@ namespace vcpkg , INTEGRATE_COMMAND_HELPSTRING); } - std::string create_example_string(const char* command_and_arguments) + std::string create_example_string(const std::string& command_and_arguments) { std::string cs = Strings::format("Example:\n" " vcpkg %s", command_and_arguments); return cs; } - void print_example(const char* command_and_arguments) + void print_example(const std::string& command_and_arguments) { System::println(create_example_string(command_and_arguments)); } |
