diff options
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/PackageSpec.h | 4 | ||||
| -rw-r--r-- | toolsrc/include/Paragraphs.h | 12 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_Files.h | 4 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_expected.h | 20 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg_paths.h | 2 |
5 files changed, 21 insertions, 21 deletions
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<PackageSpec> from_string(const std::string& spec_as_string, const Triplet& default_target_triplet); + static Expected<PackageSpec> from_string(const std::string& spec_as_string, const Triplet& default_target_triplet); - static expected<PackageSpec> from_name_and_triplet(const std::string& name, const Triplet& target_triplet); + static Expected<PackageSpec> 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<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<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); + Expected<SourceParagraph> try_load_port(const fs::path& control_path); - 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); std::vector<SourceParagraph> 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<std::string> read_contents(const fs::path& file_path) noexcept; + Expected<std::string> read_contents(const fs::path& file_path) noexcept; - expected<std::vector<std::string>> read_all_lines(const fs::path& file_path); + Expected<std::vector<std::string>> read_all_lines(const fs::path& file_path); void write_all_lines(const fs::path& file_path, const std::vector<std::string>& 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 T> - 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<vcpkg_paths> create(const fs::path& vcpkg_root_dir); + static Expected<vcpkg_paths> create(const fs::path& vcpkg_root_dir); fs::path package_dir(const PackageSpec& spec) const; fs::path port_dir(const PackageSpec& spec) const; |
