diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-04-01 03:30:52 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-04-01 03:30:52 -0700 |
| commit | b788c2b2098093843d4521d12a617199af39e7dc (patch) | |
| tree | ffcd55b39c9019adab6993c99dde130fa2aceb5d /toolsrc/include/Paragraphs.h | |
| parent | bb865fb312d9f603a18a40768ae357da0421905d (diff) | |
| download | vcpkg-b788c2b2098093843d4521d12a617199af39e7dc.tar.gz vcpkg-b788c2b2098093843d4521d12a617199af39e7dc.zip | |
[vcpkg] ImmutableSortedVector is actually Mutable via move.
Use fmap instead of construct/insert.
Don't cache VS2015 instances since it is called once.
Add ParagraphDataMap alias.
Diffstat (limited to 'toolsrc/include/Paragraphs.h')
| -rw-r--r-- | toolsrc/include/Paragraphs.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h index 39880192c..26f81ffad 100644 --- a/toolsrc/include/Paragraphs.h +++ b/toolsrc/include/Paragraphs.h @@ -9,10 +9,12 @@ namespace vcpkg::Paragraphs { - expected<std::unordered_map<std::string, std::string>> get_single_paragraph(const fs::path& control_path); - expected<std::vector<std::unordered_map<std::string, std::string>>> get_paragraphs(const fs::path& control_path); - expected<std::unordered_map<std::string, std::string>> parse_single_paragraph(const std::string& str); - expected<std::vector<std::unordered_map<std::string, std::string>>> parse_paragraphs(const std::string& str); + using ParagraphDataMap = std::unordered_map<std::string, std::string>; + + expected<ParagraphDataMap> get_single_paragraph(const fs::path& control_path); + expected<std::vector<ParagraphDataMap>> get_paragraphs(const fs::path& control_path); + expected<ParagraphDataMap> parse_single_paragraph(const std::string& str); + expected<std::vector<ParagraphDataMap>> parse_paragraphs(const std::string& str); expected<SourceParagraph> try_load_port(const fs::path& control_path); |
