mirror of https://github.com/microsoft/vcpkg.git
Remove parse_all_arguments_as_package_specs()
This commit is contained in:
parent
d7c357db2e
commit
bcb2be360a
|
|
@ -35,8 +35,6 @@ namespace vcpkg
|
|||
void check_exact_arg_count(const size_t expected_arg_count) const;
|
||||
void check_exact_arg_count(const size_t expected_arg_count, const char* example_text) const;
|
||||
|
||||
std::vector<package_spec> parse_all_arguments_as_package_specs(const triplet& default_target_triplet, const char* example_text = nullptr) const;
|
||||
|
||||
private:
|
||||
std::unordered_set<std::string> optional_command_arguments;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -237,28 +237,4 @@ namespace vcpkg
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<package_spec> vcpkg_cmd_arguments::parse_all_arguments_as_package_specs(const triplet& default_target_triplet, const char* example_text) const
|
||||
{
|
||||
size_t arg_count = command_arguments.size();
|
||||
std::vector<package_spec> specs;
|
||||
specs.reserve(arg_count);
|
||||
|
||||
for (const std::string& command_argument : command_arguments)
|
||||
{
|
||||
expected<package_spec> current_spec = package_spec::from_string(command_argument, default_target_triplet);
|
||||
if (auto spec = current_spec.get())
|
||||
{
|
||||
specs.push_back(std::move(*spec));
|
||||
}
|
||||
else
|
||||
{
|
||||
System::println(System::color::error, "Error: %s: %s", current_spec.error_code().message(), command_argument);
|
||||
print_example(Strings::format("%s zlib:x64-windows", this->command).c_str());
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
return specs;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue