diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-02-27 16:14:36 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-02-27 16:14:36 -0800 |
| commit | 54859c0f1f201dfcc78e783c77c3b477d0c86c92 (patch) | |
| tree | 6723e6c34f27ed98c41fd14fce4275de92f473ea /toolsrc/src/Paragraphs.cpp | |
| parent | b7bd8c3251dcb9ecf3f6c0201c2a513596ab09b1 (diff) | |
| download | vcpkg-54859c0f1f201dfcc78e783c77c3b477d0c86c92.tar.gz vcpkg-54859c0f1f201dfcc78e783c77c3b477d0c86c92.zip | |
Introduce extract_port_names_and_versions()
Diffstat (limited to 'toolsrc/src/Paragraphs.cpp')
| -rw-r--r-- | toolsrc/src/Paragraphs.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp index fdb583bcc..1d8106750 100644 --- a/toolsrc/src/Paragraphs.cpp +++ b/toolsrc/src/Paragraphs.cpp @@ -217,4 +217,15 @@ namespace vcpkg::Paragraphs return output; } + + std::map<std::string, std::string> extract_port_names_and_versions(const std::vector<SourceParagraph>& source_paragraphs) + { + std::map<std::string, std::string> names_and_versions; + for (const SourceParagraph& port : source_paragraphs) + { + names_and_versions.emplace(port.name, port.version); + } + + return names_and_versions; + } } |
