From 9e19213498a4f77aa9b55ce1e81a3efaabfc9844 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 3 Apr 2017 16:26:54 -0700 Subject: expected -> Expected --- toolsrc/include/PackageSpec.h | 4 ++-- toolsrc/include/Paragraphs.h | 12 ++++++------ toolsrc/include/vcpkg_Files.h | 4 ++-- toolsrc/include/vcpkg_expected.h | 20 ++++++++++---------- toolsrc/include/vcpkg_paths.h | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/PackageSpec.h b/toolsrc/include/PackageSpec.h index 393e32f14..d524b4315 100644 --- a/toolsrc/include/PackageSpec.h +++ b/toolsrc/include/PackageSpec.h @@ -7,9 +7,9 @@ namespace vcpkg { struct PackageSpec { - static expected from_string(const std::string& spec_as_string, const Triplet& default_target_triplet); + static Expected from_string(const std::string& spec_as_string, const Triplet& default_target_triplet); - static expected from_name_and_triplet(const std::string& name, const Triplet& target_triplet); + static Expected from_name_and_triplet(const std::string& name, const Triplet& target_triplet); const std::string& name() const; diff --git a/toolsrc/include/Paragraphs.h b/toolsrc/include/Paragraphs.h index 9135e0c7b..f466741c4 100644 --- a/toolsrc/include/Paragraphs.h +++ b/toolsrc/include/Paragraphs.h @@ -11,14 +11,14 @@ namespace vcpkg::Paragraphs { using ParagraphDataMap = std::unordered_map; - expected get_single_paragraph(const fs::path& control_path); - expected> get_paragraphs(const fs::path& control_path); - expected parse_single_paragraph(const std::string& str); - expected> parse_paragraphs(const std::string& str); + Expected get_single_paragraph(const fs::path& control_path); + Expected> get_paragraphs(const fs::path& control_path); + Expected parse_single_paragraph(const std::string& str); + Expected> parse_paragraphs(const std::string& str); - expected try_load_port(const fs::path& control_path); + Expected try_load_port(const fs::path& control_path); - expected try_load_cached_package(const vcpkg_paths& paths, const PackageSpec& spec); + Expected try_load_cached_package(const vcpkg_paths& paths, const PackageSpec& spec); std::vector load_all_ports(const fs::path& ports_dir); diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h index 3998fbfe3..c1cf5b371 100644 --- a/toolsrc/include/vcpkg_Files.h +++ b/toolsrc/include/vcpkg_Files.h @@ -10,9 +10,9 @@ namespace vcpkg::Files bool has_invalid_chars_for_filesystem(const std::string& s); - expected read_contents(const fs::path& file_path) noexcept; + Expected read_contents(const fs::path& file_path) noexcept; - expected> read_all_lines(const fs::path& file_path); + Expected> read_all_lines(const fs::path& file_path); void write_all_lines(const fs::path& file_path, const std::vector& lines); diff --git a/toolsrc/include/vcpkg_expected.h b/toolsrc/include/vcpkg_expected.h index 3ab750cad..044f47c8c 100644 --- a/toolsrc/include/vcpkg_expected.h +++ b/toolsrc/include/vcpkg_expected.h @@ -6,34 +6,34 @@ namespace vcpkg { template - class expected + class Expected { public: // Constructors are intentionally implicit - expected(const std::error_code& ec) : m_error_code(ec), m_t() + Expected(const std::error_code& ec) : m_error_code(ec), m_t() { } - expected(std::errc ec) : expected(std::make_error_code(ec)) + Expected(std::errc ec) : Expected(std::make_error_code(ec)) { } - expected(const T& t) : m_error_code(), m_t(t) + Expected(const T& t) : m_error_code(), m_t(t) { } - expected(T&& t) : m_error_code(), m_t(std::move(t)) + Expected(T&& t) : m_error_code(), m_t(std::move(t)) { } - expected() : expected(std::error_code(), T()) + Expected() : Expected(std::error_code(), T()) { } - expected(const expected&) = default; - expected(expected&&) = default; - expected& operator=(const expected&) = default; - expected& operator=(expected&&) = default; + Expected(const Expected&) = default; + Expected(Expected&&) = default; + Expected& operator=(const Expected&) = default; + Expected& operator=(Expected&&) = default; std::error_code error_code() const { diff --git a/toolsrc/include/vcpkg_paths.h b/toolsrc/include/vcpkg_paths.h index c6ed34937..58b75fb54 100644 --- a/toolsrc/include/vcpkg_paths.h +++ b/toolsrc/include/vcpkg_paths.h @@ -16,7 +16,7 @@ namespace vcpkg struct vcpkg_paths { - static expected create(const fs::path& vcpkg_root_dir); + static Expected create(const fs::path& vcpkg_root_dir); fs::path package_dir(const PackageSpec& spec) const; fs::path port_dir(const PackageSpec& spec) const; -- cgit v1.2.3