remove_plan_type -> RemovePlanType

This commit is contained in:
Alexander Karatarakis 2017-04-03 16:23:46 -07:00
parent c9f4f312ae
commit 1723c4e541
3 changed files with 13 additions and 13 deletions

View File

@ -44,7 +44,7 @@ namespace vcpkg::Dependencies
InstallPlanAction plan;
};
enum class remove_plan_type
enum class RemovePlanType
{
UNKNOWN,
NOT_INSTALLED,
@ -54,14 +54,14 @@ namespace vcpkg::Dependencies
struct remove_plan_action
{
remove_plan_action();
remove_plan_action(const remove_plan_type& plan_type, const RequestType& request_type);
remove_plan_action(const RemovePlanType& 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;
remove_plan_action& operator=(remove_plan_action&&) = default;
remove_plan_type plan_type;
RemovePlanType plan_type;
RequestType request_type;
};

View File

@ -9,7 +9,7 @@
namespace vcpkg::Commands::Remove
{
using Dependencies::package_spec_with_remove_plan;
using Dependencies::remove_plan_type;
using Dependencies::RemovePlanType;
using Dependencies::RequestType;
using Update::OutdatedPackage;
@ -116,13 +116,13 @@ namespace vcpkg::Commands::Remove
for (const package_spec_with_remove_plan& i : plan)
{
if (i.plan.plan_type == remove_plan_type::NOT_INSTALLED)
if (i.plan.plan_type == RemovePlanType::NOT_INSTALLED)
{
not_installed.push_back(&i);
continue;
}
if (i.plan.plan_type == remove_plan_type::REMOVE)
if (i.plan.plan_type == RemovePlanType::REMOVE)
{
remove.push_back(&i);
continue;
@ -230,15 +230,15 @@ namespace vcpkg::Commands::Remove
switch (action.plan.plan_type)
{
case remove_plan_type::NOT_INSTALLED:
case RemovePlanType::NOT_INSTALLED:
System::println(System::color::success, "Package %s is not installed", display_name);
break;
case remove_plan_type::REMOVE:
case RemovePlanType::REMOVE:
System::println("Removing package %s... ", display_name);
remove_package(paths, action.spec, &status_db);
System::println(System::color::success, "Removing package %s... done", display_name);
break;
case remove_plan_type::UNKNOWN:
case RemovePlanType::UNKNOWN:
default:
Checks::unreachable(VCPKG_LINE_INFO);
}

View File

@ -22,11 +22,11 @@ namespace vcpkg::Dependencies
{
}
remove_plan_action::remove_plan_action() : plan_type(remove_plan_type::UNKNOWN), request_type(RequestType::UNKNOWN)
remove_plan_action::remove_plan_action() : plan_type(RemovePlanType::UNKNOWN), request_type(RequestType::UNKNOWN)
{
}
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)
remove_plan_action::remove_plan_action(const RemovePlanType& 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, RequestType::USER_REQUESTED));
was_examined.emplace(spec, remove_plan_action(RemovePlanType::NOT_INSTALLED, RequestType::USER_REQUESTED));
continue;
}
@ -146,7 +146,7 @@ namespace vcpkg::Dependencies
}
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));
was_examined.emplace(spec, remove_plan_action(RemovePlanType::REMOVE, request_type));
}
std::vector<package_spec_with_remove_plan> ret;