diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-03 12:46:04 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-14 13:35:01 +0100 |
commit | 4c12fa12f7ad54174cce97ee511b9a897c992fc1 (patch) | |
tree | eda89878d4f76abb74a8b5814f84a5472241c60c | |
parent | bcd000bed5f98b906ea4761ebe7422bca477672b (diff) | |
download | justbuild-4c12fa12f7ad54174cce97ee511b9a897c992fc1.tar.gz |
just_mr utils: Add missing nodiscard attributes
-rw-r--r-- | src/other_tools/just_mr/utils.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/other_tools/just_mr/utils.hpp b/src/other_tools/just_mr/utils.hpp index 3aff2348..0fc18748 100644 --- a/src/other_tools/just_mr/utils.hpp +++ b/src/other_tools/just_mr/utils.hpp @@ -142,17 +142,18 @@ namespace JustMR::Utils { /// \brief Recursive part of the ResolveRepo function. /// Keeps track of repository names to detect any cyclic dependencies. -auto ResolveRepo(ExpressionPtr const& repo_desc, - ExpressionPtr const& repos, - gsl::not_null<std::unordered_set<std::string>*> const& seen) +[[nodiscard]] auto ResolveRepo( + ExpressionPtr const& repo_desc, + ExpressionPtr const& repos, + gsl::not_null<std::unordered_set<std::string>*> const& seen) -> std::optional<ExpressionPtr>; /// \brief Resolves any cyclic dependency issues and follows the repository /// dependencies until the one containing the WS root is found. /// Returns a repository entry as an ExpressionPtr, or nullopt if cyclic /// dependency found. -auto ResolveRepo(ExpressionPtr const& repo_desc, - ExpressionPtr const& repos) noexcept +[[nodiscard]] auto ResolveRepo(ExpressionPtr const& repo_desc, + ExpressionPtr const& repos) noexcept -> std::optional<ExpressionPtr>; } // namespace JustMR::Utils |