Add missing method const
MODIFY
include/vcpkg/dependencies.h
include/vcpkg/dependencies.h
@@ -151,8 +151,8 @@ namespace vcpkg::Dependencies
PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db);
~PackageGraph();
- void install(const FeatureSpec& spec);
- void upgrade(const PackageSpec& spec);
+ void install(const FeatureSpec& spec) const;
+ void upgrade(const PackageSpec& spec) const;
std::vector<AnyAction> serialize() const;

MODIFY
src/vcpkg/dependencies.cpp
src/vcpkg/dependencies.cpp
@@ -527,7 +527,7 @@ namespace vcpkg::Dependencies
return create_feature_install_plan(provider, specs, status_db);
}
- void PackageGraph::install(const FeatureSpec& spec)
+ void PackageGraph::install(const FeatureSpec& spec) const
{
Cluster& spec_cluster = m_graph->get(spec.spec());
spec_cluster.request_type = RequestType::USER_REQUESTED;
@@ -565,7 +565,7 @@ namespace vcpkg::Dependencies
m_graph_plan->install_graph.add_vertex(ClusterPtr{&spec_cluster});
}
- void PackageGraph::upgrade(const PackageSpec& spec)
+ void PackageGraph::upgrade(const PackageSpec& spec) const
{
Cluster& spec_cluster = m_graph->get(spec);
spec_cluster.request_type = RequestType::USER_REQUESTED;

Add missing method const