aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-08-22 15:14:15 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-08-22 15:14:15 -0700
commit92dd1b77ed043da376c86874aacc1233270fedae (patch)
tree70177d807fcbfd4614b82b66f11d30f8d4c4731d /toolsrc/src
parentbee29497f9e210c2b8d33edccba0d1d95188d852 (diff)
downloadvcpkg-92dd1b77ed043da376c86874aacc1233270fedae.tar.gz
vcpkg-92dd1b77ed043da376c86874aacc1233270fedae.zip
[vcpkg] Add Util::ResourceBase, use MoveOnlyBase
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/test_install_plan.cpp6
-rw-r--r--toolsrc/src/vcpkg_Dependencies.cpp11
2 files changed, 5 insertions, 12 deletions
diff --git a/toolsrc/src/test_install_plan.cpp b/toolsrc/src/test_install_plan.cpp
index 836ff09ae..6c9311264 100644
--- a/toolsrc/src/test_install_plan.cpp
+++ b/toolsrc/src/test_install_plan.cpp
@@ -151,7 +151,7 @@ namespace UnitTest1
auto spec_b = spec_map.emplace("b", "c");
auto spec_c = spec_map.emplace("c");
- auto map_port = Dependencies::MapPortFile(spec_map.map);
+ Dependencies::MapPortFile map_port(spec_map.map);
auto install_plan =
Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs)));
@@ -175,7 +175,7 @@ namespace UnitTest1
auto spec_g = spec_map.emplace("g");
auto spec_h = spec_map.emplace("h");
- auto map_port = Dependencies::MapPortFile(spec_map.map);
+ Dependencies::MapPortFile map_port(spec_map.map);
auto install_plan = Dependencies::create_install_plan(
map_port, {spec_a, spec_b, spec_c}, StatusParagraphs(std::move(status_paragraphs)));
@@ -268,7 +268,7 @@ namespace UnitTest1
auto spec_j = spec_map.emplace("j", "k");
auto spec_k = spec_map.emplace("k");
- auto map_port = Dependencies::MapPortFile(spec_map.map);
+ Dependencies::MapPortFile map_port(spec_map.map);
auto install_plan =
Dependencies::create_install_plan(map_port, {spec_a}, StatusParagraphs(std::move(status_paragraphs)));
diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp
index 512e65e28..188b0f444 100644
--- a/toolsrc/src/vcpkg_Dependencies.cpp
+++ b/toolsrc/src/vcpkg_Dependencies.cpp
@@ -19,7 +19,7 @@ namespace vcpkg::Dependencies
bool plus = false;
};
- struct Cluster
+ struct Cluster : Util::MoveOnlyBase
{
std::vector<StatusParagraph*> status_paragraphs;
Optional<const SourceControlFile*> source_control_file;
@@ -30,11 +30,6 @@ namespace vcpkg::Dependencies
bool will_remove = false;
bool transient_uninstalled = true;
RequestType request_type = RequestType::AUTO_SELECTED;
- Cluster() = default;
-
- private:
- Cluster(const Cluster&) = delete;
- Cluster& operator=(const Cluster&) = delete;
};
struct ClusterPtr
@@ -64,13 +59,12 @@ namespace vcpkg::Dependencies
Graphs::Graph<ClusterPtr> install_graph;
};
- struct ClusterGraph
+ struct ClusterGraph : Util::MoveOnlyBase
{
explicit ClusterGraph(std::unordered_map<std::string, const SourceControlFile*>&& ports)
: m_ports(std::move(ports))
{
}
- ClusterGraph(ClusterGraph&&) = default;
Cluster& get(const PackageSpec& spec)
{
@@ -108,7 +102,6 @@ namespace vcpkg::Dependencies
out_cluster.source_control_file = &scf;
}
- ClusterGraph(const ClusterGraph&) = delete;
std::unordered_map<PackageSpec, Cluster> m_graph;
std::unordered_map<std::string, const SourceControlFile*> m_ports;
};