diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-30 15:29:02 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-01-30 21:52:43 -0800 |
| commit | 836de4b0748617db6d06b0eef6fe9ccff9980b1f (patch) | |
| tree | 1f61677d52afca7c606e39562006dae4f82faa1d | |
| parent | a7be90f823d9a3b33e58568c28836be33bda5ac8 (diff) | |
| download | vcpkg-836de4b0748617db6d06b0eef6fe9ccff9980b1f.tar.gz vcpkg-836de4b0748617db6d06b0eef6fe9ccff9980b1f.zip | |
Fix remove_plan code
| -rw-r--r-- | toolsrc/include/vcpkg_Dependencies.h | 2 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg_Dependencies.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h index ac4a13e84..9180cb65e 100644 --- a/toolsrc/include/vcpkg_Dependencies.h +++ b/toolsrc/include/vcpkg_Dependencies.h @@ -42,7 +42,7 @@ namespace vcpkg::Dependencies { remove_plan_type plan_type; request_type request_type; - std::unique_ptr<StatusParagraph> status_pgh; + StatusParagraph* status_pgh; }; struct package_spec_with_remove_plan diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp index 669cdfc20..bb2ecc666 100644 --- a/toolsrc/src/vcpkg_Dependencies.cpp +++ b/toolsrc/src/vcpkg_Dependencies.cpp @@ -90,7 +90,7 @@ namespace vcpkg::Dependencies continue; } - auto it = status_db.find(spec); + const StatusParagraphs::const_iterator it = status_db.find(spec); if (it == status_db.end() || (*it)->state == install_state_t::not_installed) { was_examined.emplace(spec, remove_plan_action{remove_plan_type::NOT_INSTALLED, request_type::USER_REQUESTED, nullptr}); @@ -115,7 +115,7 @@ namespace vcpkg::Dependencies } const request_type request_type = specs_as_set.find(spec) != specs_as_set.end() ? request_type::USER_REQUESTED : request_type::AUTO_SELECTED; - was_examined.emplace(spec, remove_plan_action{remove_plan_type::REMOVE, request_type,std::make_unique<StatusParagraph>(std::move(**it))}); + was_examined.emplace(spec, remove_plan_action{remove_plan_type::REMOVE, request_type,it->get()}); } std::vector<package_spec_with_remove_plan> ret; |
