want_t -> Want
MODIFY
include/StatusParagraph.h
include/StatusParagraph.h
@@ -13,7 +13,7 @@ namespace vcpkg
INSTALLED,
};
- enum class want_t
+ enum class Want
{
error,
unknown,
@@ -29,7 +29,7 @@ namespace vcpkg
explicit StatusParagraph(const std::unordered_map<std::string, std::string>& fields);
BinaryParagraph package;
- want_t want;
+ Want want;
InstallState state;
};
@@ -37,5 +37,5 @@ namespace vcpkg
std::string to_string(InstallState f);
- std::string to_string(want_t f);
+ std::string to_string(Want f);
}

MODIFY
src/StatusParagraph.cpp
src/StatusParagraph.cpp
@@ -12,7 +12,7 @@ namespace vcpkg
static const std::string STATUS = "Status";
}
- StatusParagraph::StatusParagraph() : want(want_t::error), state(InstallState::ERROR_STATE)
+ StatusParagraph::StatusParagraph() : want(Want::error), state(InstallState::ERROR_STATE)
{
}
@@ -39,16 +39,16 @@ namespace vcpkg
want = [](const std::string& text)
{
if (text == "unknown")
- return want_t::unknown;
+ return Want::unknown;
if (text == "install")
- return want_t::install;
+ return Want::install;
if (text == "hold")
- return want_t::hold;
+ return Want::hold;
if (text == "deinstall")
- return want_t::deinstall;
+ return Want::deinstall;
if (text == "purge")
- return want_t::purge;
- return want_t::error;
+ return Want::purge;
+ return Want::error;
}(std::string(mark, b));
if (std::distance(b, e) < 4)
@@ -78,15 +78,15 @@ namespace vcpkg
}
}
- std::string to_string(want_t f)
+ std::string to_string(Want f)
{
switch (f)
{
- case want_t::deinstall: return "deinstall";
- case want_t::hold: return "hold";
- case want_t::install: return "install";
- case want_t::purge: return "purge";
- case want_t::unknown: return "unknown";
+ case Want::deinstall: return "deinstall";
+ case Want::hold: return "hold";
+ case Want::install: return "install";
+ case Want::purge: return "purge";
+ case Want::unknown: return "unknown";
default: return "error";
}
}

MODIFY
src/StatusParagraphs.cpp
src/StatusParagraphs.cpp
@@ -32,7 +32,7 @@ namespace vcpkg
StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name, const Triplet& target_triplet) const
{
const const_iterator it = find(name, target_triplet);
- if (it != end() && (*it)->want == want_t::install)
+ if (it != end() && (*it)->want == Want::install)
{
return it;
}

MODIFY
src/commands_install.cpp
src/commands_install.cpp
@@ -164,7 +164,7 @@ namespace vcpkg::Commands::Install
StatusParagraph spgh;
spgh.package = binary_paragraph;
- spgh.want = want_t::install;
+ spgh.want = Want::install;
spgh.state = InstallState::HALF_INSTALLED;
for (auto&& dep : spgh.package.depends)
{

MODIFY
src/commands_remove.cpp
src/commands_remove.cpp
@@ -31,7 +31,7 @@ namespace vcpkg::Commands::Remove
{
StatusParagraph& pkg = **status_db->find(spec.name(), spec.target_triplet());
- pkg.want = want_t::purge;
+ pkg.want = Want::purge;
pkg.state = InstallState::HALF_INSTALLED;
write_update(paths, pkg);

MODIFY
src/vcpkg_Dependencies.cpp
src/vcpkg_Dependencies.cpp
@@ -66,7 +66,7 @@ namespace vcpkg::Dependencies
};
auto it = status_db.find(spec);
- if (it != status_db.end() && (*it)->want == want_t::install)
+ if (it != status_db.end() && (*it)->want == Want::install)
{
was_examined.emplace(spec, install_plan_action{install_plan_type::ALREADY_INSTALLED, nullopt, nullopt });
continue;
@@ -130,7 +130,7 @@ namespace vcpkg::Dependencies
for (const std::unique_ptr<StatusParagraph>& an_installed_package : status_db)
{
- if (an_installed_package->want != want_t::install)
+ if (an_installed_package->want != Want::install)
continue;
if (an_installed_package->package.spec.target_triplet() != spec.target_triplet())
continue;

MODIFY
src/vcpkglib.cpp
src/vcpkglib.cpp
@@ -176,7 +176,7 @@ namespace vcpkg
std::vector<StatusParagraph*> installed_packages;
for (auto&& pgh : status_db)
{
- if (pgh->state == InstallState::NOT_INSTALLED && pgh->want == want_t::purge)
+ if (pgh->state == InstallState::NOT_INSTALLED && pgh->want == Want::purge)
continue;
installed_packages.push_back(pgh.get());
}

want_t -> Want