mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
request_type -> RequestType
This commit is contained in:
parent
6ac7eb7bfb
commit
1d8099fd8c
@ -7,7 +7,7 @@
|
||||
|
||||
namespace vcpkg::Dependencies
|
||||
{
|
||||
enum class request_type
|
||||
enum class RequestType
|
||||
{
|
||||
UNKNOWN,
|
||||
USER_REQUESTED,
|
||||
@ -54,7 +54,7 @@ namespace vcpkg::Dependencies
|
||||
struct remove_plan_action
|
||||
{
|
||||
remove_plan_action();
|
||||
remove_plan_action(const remove_plan_type& plan_type, const request_type& request_type);
|
||||
remove_plan_action(const remove_plan_type& plan_type, const RequestType& request_type);
|
||||
remove_plan_action(const remove_plan_action&) = delete;
|
||||
remove_plan_action(remove_plan_action&&) = default;
|
||||
remove_plan_action& operator=(const remove_plan_action&) = delete;
|
||||
@ -62,7 +62,7 @@ namespace vcpkg::Dependencies
|
||||
|
||||
|
||||
remove_plan_type plan_type;
|
||||
request_type request_type;
|
||||
RequestType request_type;
|
||||
};
|
||||
|
||||
struct package_spec_with_remove_plan
|
||||
|
@ -10,8 +10,8 @@ namespace vcpkg::Commands::Remove
|
||||
{
|
||||
using Dependencies::package_spec_with_remove_plan;
|
||||
using Dependencies::remove_plan_type;
|
||||
using Dependencies::request_type;
|
||||
using Update::outdated_package;
|
||||
using Dependencies::RequestType;
|
||||
using Update::OutdatedPackage;
|
||||
|
||||
static void delete_directory(const fs::path& directory)
|
||||
{
|
||||
@ -147,12 +147,12 @@ namespace vcpkg::Commands::Remove
|
||||
System::println("The following packages will be removed:\n%s",
|
||||
Strings::join("\n", remove, [](const package_spec_with_remove_plan* p)
|
||||
{
|
||||
if (p->plan.request_type == Dependencies::request_type::AUTO_SELECTED)
|
||||
if (p->plan.request_type == Dependencies::RequestType::AUTO_SELECTED)
|
||||
{
|
||||
return " * " + p->spec.toString();
|
||||
}
|
||||
|
||||
if (p->plan.request_type == Dependencies::request_type::USER_REQUESTED)
|
||||
if (p->plan.request_type == Dependencies::RequestType::USER_REQUESTED)
|
||||
{
|
||||
return " " + p->spec.toString();
|
||||
}
|
||||
@ -205,7 +205,7 @@ namespace vcpkg::Commands::Remove
|
||||
|
||||
const bool has_non_user_requested_packages = std::find_if(remove_plan.cbegin(), remove_plan.cend(), [](const package_spec_with_remove_plan& package)-> bool
|
||||
{
|
||||
return package.plan.request_type != request_type::USER_REQUESTED;
|
||||
return package.plan.request_type != RequestType::USER_REQUESTED;
|
||||
}) != remove_plan.cend();
|
||||
|
||||
if (has_non_user_requested_packages)
|
||||
|
@ -22,11 +22,11 @@ namespace vcpkg::Dependencies
|
||||
{
|
||||
}
|
||||
|
||||
remove_plan_action::remove_plan_action() : plan_type(remove_plan_type::UNKNOWN), request_type(request_type::UNKNOWN)
|
||||
remove_plan_action::remove_plan_action() : plan_type(remove_plan_type::UNKNOWN), request_type(RequestType::UNKNOWN)
|
||||
{
|
||||
}
|
||||
|
||||
remove_plan_action::remove_plan_action(const remove_plan_type& plan_type, const Dependencies::request_type& request_type) : plan_type(plan_type), request_type(request_type)
|
||||
remove_plan_action::remove_plan_action(const remove_plan_type& plan_type, const Dependencies::RequestType& request_type) : plan_type(plan_type), request_type(request_type)
|
||||
{
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ namespace vcpkg::Dependencies
|
||||
const StatusParagraphs::const_iterator it = status_db.find(spec);
|
||||
if (it == status_db.end() || (*it)->state == InstallState::NOT_INSTALLED)
|
||||
{
|
||||
was_examined.emplace(spec, remove_plan_action(remove_plan_type::NOT_INSTALLED, request_type::USER_REQUESTED));
|
||||
was_examined.emplace(spec, remove_plan_action(remove_plan_type::NOT_INSTALLED, RequestType::USER_REQUESTED));
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ namespace vcpkg::Dependencies
|
||||
examine_stack.push_back(an_installed_package.get()->package.spec);
|
||||
}
|
||||
|
||||
const request_type request_type = specs_as_set.find(spec) != specs_as_set.end() ? request_type::USER_REQUESTED : request_type::AUTO_SELECTED;
|
||||
const RequestType request_type = specs_as_set.find(spec) != specs_as_set.end() ? RequestType::USER_REQUESTED : RequestType::AUTO_SELECTED;
|
||||
was_examined.emplace(spec, remove_plan_action(remove_plan_type::REMOVE, request_type));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user