mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
parse_all_arguments_as_package_specs: remove unused parameter
This commit is contained in:
parent
76149ffac5
commit
cd30cd4df9
@ -27,7 +27,7 @@ namespace vcpkg
|
|||||||
std::unordered_set<std::string> check_and_get_optional_command_arguments(const std::vector<std::string>& valid_options) const;
|
std::unordered_set<std::string> check_and_get_optional_command_arguments(const std::vector<std::string>& valid_options) const;
|
||||||
|
|
||||||
void check_max_args(size_t arg_count, const char* example_text = nullptr) const;
|
void check_max_args(size_t arg_count, const char* example_text = nullptr) const;
|
||||||
std::vector<package_spec> parse_all_arguments_as_package_specs(const vcpkg_paths& paths, const triplet& default_target_triplet, const char* example_text = nullptr) const;
|
std::vector<package_spec> parse_all_arguments_as_package_specs(const triplet& default_target_triplet, const char* example_text = nullptr) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unordered_set<std::string> optional_command_arguments;
|
std::unordered_set<std::string> optional_command_arguments;
|
||||||
|
@ -7,7 +7,7 @@ namespace vcpkg
|
|||||||
void create_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet)
|
void create_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths, const triplet& default_target_triplet)
|
||||||
{
|
{
|
||||||
args.check_max_args(3);
|
args.check_max_args(3);
|
||||||
package_spec spec = args.parse_all_arguments_as_package_specs(paths, default_target_triplet).at(0);
|
package_spec spec = args.parse_all_arguments_as_package_specs(default_target_triplet).at(0);
|
||||||
if (args.command_arguments.size() < 2)
|
if (args.command_arguments.size() < 2)
|
||||||
{
|
{
|
||||||
System::println(System::color::error, "Error: create requires the archive's URL as the second argument.");
|
System::println(System::color::error, "Error: create requires the archive's URL as the second argument.");
|
||||||
|
@ -7,7 +7,7 @@ namespace vcpkg
|
|||||||
{
|
{
|
||||||
static auto example = "edit zlib";
|
static auto example = "edit zlib";
|
||||||
args.check_max_args(1, example);
|
args.check_max_args(1, example);
|
||||||
package_spec spec = args.parse_all_arguments_as_package_specs(paths, default_target_triplet, example).at(0);
|
package_spec spec = args.parse_all_arguments_as_package_specs(default_target_triplet, example).at(0);
|
||||||
|
|
||||||
// Find editor
|
// Find editor
|
||||||
std::wstring env_EDITOR = System::wdupenv_str(L"EDITOR");
|
std::wstring env_EDITOR = System::wdupenv_str(L"EDITOR");
|
||||||
|
@ -60,7 +60,7 @@ namespace vcpkg
|
|||||||
{
|
{
|
||||||
StatusParagraphs status_db = database_load_check(paths);
|
StatusParagraphs status_db = database_load_check(paths);
|
||||||
|
|
||||||
std::vector<package_spec> specs = args.parse_all_arguments_as_package_specs(paths, default_target_triplet);
|
std::vector<package_spec> specs = args.parse_all_arguments_as_package_specs(default_target_triplet);
|
||||||
std::vector<package_spec> install_plan = Dependencies::create_dependency_ordered_install_plan(paths, specs, status_db);
|
std::vector<package_spec> install_plan = Dependencies::create_dependency_ordered_install_plan(paths, specs, status_db);
|
||||||
Checks::check_exit(!install_plan.empty(), "Install plan cannot be empty");
|
Checks::check_exit(!install_plan.empty(), "Install plan cannot be empty");
|
||||||
std::string specs_string = to_string(install_plan[0]);
|
std::string specs_string = to_string(install_plan[0]);
|
||||||
@ -119,7 +119,7 @@ namespace vcpkg
|
|||||||
|
|
||||||
StatusParagraphs status_db = database_load_check(paths);
|
StatusParagraphs status_db = database_load_check(paths);
|
||||||
|
|
||||||
const package_spec spec = args.parse_all_arguments_as_package_specs(paths, default_target_triplet).at(0);
|
const package_spec spec = args.parse_all_arguments_as_package_specs(default_target_triplet).at(0);
|
||||||
std::unordered_set<package_spec> unmet_dependencies = Dependencies::find_unmet_dependencies(paths, spec, status_db);
|
std::unordered_set<package_spec> unmet_dependencies = Dependencies::find_unmet_dependencies(paths, spec, status_db);
|
||||||
if (!unmet_dependencies.empty())
|
if (!unmet_dependencies.empty())
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ namespace vcpkg
|
|||||||
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({OPTION_PURGE});
|
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({OPTION_PURGE});
|
||||||
auto status_db = database_load_check(paths);
|
auto status_db = database_load_check(paths);
|
||||||
|
|
||||||
std::vector<package_spec> specs = args.parse_all_arguments_as_package_specs(paths, default_target_triplet);
|
std::vector<package_spec> specs = args.parse_all_arguments_as_package_specs(default_target_triplet);
|
||||||
bool alsoRemoveFolderFromPackages = options.find(OPTION_PURGE) != options.end();
|
bool alsoRemoveFolderFromPackages = options.find(OPTION_PURGE) != options.end();
|
||||||
|
|
||||||
for (const package_spec& spec : specs)
|
for (const package_spec& spec : specs)
|
||||||
|
@ -179,7 +179,7 @@ namespace vcpkg
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<package_spec> vcpkg_cmd_arguments::parse_all_arguments_as_package_specs(const vcpkg_paths& paths, const triplet& default_target_triplet, const char* example_text) const
|
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();
|
size_t arg_count = command_arguments.size();
|
||||||
if (arg_count < 1)
|
if (arg_count < 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user