mirror of https://github.com/microsoft/vcpkg.git
Change signature to std::string& (from char*)
This commit is contained in:
parent
9796e2532c
commit
e523668cce
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue