aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/Paragraphs.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-03 16:26:54 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-04 16:44:45 -0700
commit9e19213498a4f77aa9b55ce1e81a3efaabfc9844 (patch)
tree52a29894cd34887e413c1c2624c22817fdb65096 /toolsrc/src/Paragraphs.cpp
parentccbb2ebcdafa3978105115840285466d57c87186 (diff)
downloadvcpkg-9e19213498a4f77aa9b55ce1e81a3efaabfc9844.tar.gz
vcpkg-9e19213498a4f77aa9b55ce1e81a3efaabfc9844.zip
expected -> Expected
Diffstat (limited to 'toolsrc/src/Paragraphs.cpp')
-rw-r--r--toolsrc/src/Paragraphs.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp
index 61da7a866..4fd424f83 100644
--- a/toolsrc/src/Paragraphs.cpp
+++ b/toolsrc/src/Paragraphs.cpp
@@ -172,9 +172,9 @@ namespace vcpkg::Paragraphs
}
};
- expected<std::unordered_map<std::string, std::string>> get_single_paragraph(const fs::path& control_path)
+ Expected<std::unordered_map<std::string, std::string>> get_single_paragraph(const fs::path& control_path)
{
- const expected<std::string> contents = Files::read_contents(control_path);
+ const Expected<std::string> contents = Files::read_contents(control_path);
if (auto spgh = contents.get())
{
return parse_single_paragraph(*spgh);
@@ -183,9 +183,9 @@ namespace vcpkg::Paragraphs
return contents.error_code();
}
- expected<std::vector<std::unordered_map<std::string, std::string>>> get_paragraphs(const fs::path& control_path)
+ Expected<std::vector<std::unordered_map<std::string, std::string>>> get_paragraphs(const fs::path& control_path)
{
- const expected<std::string> contents = Files::read_contents(control_path);
+ const Expected<std::string> contents = Files::read_contents(control_path);
if (auto spgh = contents.get())
{
return parse_paragraphs(*spgh);
@@ -194,7 +194,7 @@ namespace vcpkg::Paragraphs
return contents.error_code();
}
- expected<std::unordered_map<std::string, std::string>> parse_single_paragraph(const std::string& str)
+ Expected<std::unordered_map<std::string, std::string>> parse_single_paragraph(const std::string& str)
{
const std::vector<std::unordered_map<std::string, std::string>> p = Parser(str.c_str(), str.c_str() + str.size()).get_paragraphs();
@@ -206,14 +206,14 @@ namespace vcpkg::Paragraphs
return std::error_code(ParagraphParseResult::EXPECTED_ONE_PARAGRAPH);
}
- expected<std::vector<std::unordered_map<std::string, std::string>>> parse_paragraphs(const std::string& str)
+ Expected<std::vector<std::unordered_map<std::string, std::string>>> parse_paragraphs(const std::string& str)
{
return Parser(str.c_str(), str.c_str() + str.size()).get_paragraphs();
}
- expected<SourceParagraph> try_load_port(const fs::path& path)
+ Expected<SourceParagraph> try_load_port(const fs::path& path)
{
- expected<std::unordered_map<std::string, std::string>> pghs = get_single_paragraph(path / "CONTROL");
+ Expected<std::unordered_map<std::string, std::string>> pghs = get_single_paragraph(path / "CONTROL");
if (auto p = pghs.get())
{
return SourceParagraph(*p);
@@ -222,9 +222,9 @@ namespace vcpkg::Paragraphs
return pghs.error_code();
}
- expected<BinaryParagraph> try_load_cached_package(const vcpkg_paths& paths, const PackageSpec& spec)
+ Expected<BinaryParagraph> try_load_cached_package(const vcpkg_paths& paths, const PackageSpec& spec)
{
- expected<std::unordered_map<std::string, std::string>> pghs = get_single_paragraph(paths.package_dir(spec) / "CONTROL");
+ Expected<std::unordered_map<std::string, std::string>> pghs = get_single_paragraph(paths.package_dir(spec) / "CONTROL");
if (auto p = pghs.get())
{
@@ -240,7 +240,7 @@ namespace vcpkg::Paragraphs
for (auto it = fs::directory_iterator(ports_dir); it != fs::directory_iterator(); ++it)
{
const fs::path& path = it->path();
- expected<SourceParagraph> source_paragraph = try_load_port(path);
+ Expected<SourceParagraph> source_paragraph = try_load_port(path);
if (auto srcpgh = source_paragraph.get())
{
output.emplace_back(std::move(*srcpgh));