From 73d7feb6a9ce885863213bfeffbbdec0ad7c2935 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 1 Dec 2023 10:40:11 +0100 Subject: FileRoot: Add ignore-special flag getter and remove unneeded inlining --- src/buildtool/file_system/file_root.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/buildtool/file_system/file_root.hpp') diff --git a/src/buildtool/file_system/file_root.hpp b/src/buildtool/file_system/file_root.hpp index 4c6b07a3..950cd36b 100644 --- a/src/buildtool/file_system/file_root.hpp +++ b/src/buildtool/file_system/file_root.hpp @@ -595,11 +595,11 @@ class FileRoot { return std::nullopt; // absent roots are neither LOCAL nor KNOWN } - [[nodiscard]] inline auto IsAbsent() const noexcept -> bool { + [[nodiscard]] auto IsAbsent() const noexcept -> bool { return std::holds_alternative(root_); } - [[nodiscard]] inline auto GetAbsentTreeId() const noexcept + [[nodiscard]] auto GetAbsentTreeId() const noexcept -> std::optional { if (std::holds_alternative(root_)) { try { @@ -611,6 +611,10 @@ class FileRoot { return std::nullopt; } + [[nodiscard]] auto IgnoreSpecial() const noexcept -> bool { + return ignore_special_; + } + /// \brief Parses a FileRoot from string. On errors, populates error_msg. /// \returns the FileRoot and optional local path (if the root is local), /// nullopt on errors. -- cgit v1.2.3