diff options
| author | Wimok Nupphiboon <wimok.mok@gmail.com> | 2018-03-30 21:58:49 +0700 |
|---|---|---|
| committer | Wimok Nupphiboon <wimok.mok@gmail.com> | 2018-03-30 21:58:49 +0700 |
| commit | c681f4ee840c81a508fc0e8352c9aedf66fb5eaf (patch) | |
| tree | 5bda96eca1cee03af97da726b9b3d3038d75fae1 /toolsrc/include | |
| parent | 663be4bbffd435cf5e5fc62a0774c784c10ddc68 (diff) | |
| parent | f9d4692749ad68340a07453add49a8ef029fa155 (diff) | |
| download | vcpkg-c681f4ee840c81a508fc0e8352c9aedf66fb5eaf.tar.gz vcpkg-c681f4ee840c81a508fc0e8352c9aedf66fb5eaf.zip | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/util.h | 12 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/dependencies.h | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index c73345719..7266fbbc6 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -3,6 +3,7 @@ #include <algorithm> #include <map> #include <mutex> +#include <unordered_map> #include <utility> #include <vector> @@ -29,6 +30,17 @@ namespace vcpkg::Util } } + namespace Maps + { + template<class K, class V1, class V2, class Func> + void transform_values(const std::unordered_map<K, V1>& container, std::unordered_map<K, V2>& output, Func func) + { + std::for_each(container.cbegin(), container.cend(), [&](const std::pair<const K, V1>& p) { + output[p.first] = func(p.second); + }); + } + } + template<class Cont, class Func> using FmapOut = decltype(std::declval<Func&>()(*begin(std::declval<Cont&>()))); diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index 33af6c4f5..fea0d88a9 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -175,7 +175,7 @@ namespace vcpkg::Dependencies const std::vector<FeatureSpec>& specs, const StatusParagraphs& status_db); - std::vector<AnyAction> create_feature_install_plan(const PortFileProvider& port_file_provider, + std::vector<AnyAction> create_feature_install_plan(const PortFileProvider& provider, const std::vector<FeatureSpec>& specs, const StatusParagraphs& status_db); |
