From b716a901802314ad57588b4b75f9ea785219827a Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 10 Sep 2024 12:16:35 +0200 Subject: Return ArtifactDigest from RepositoryConfig::RepositoryKey ...to prevent additional conversions to ArtifactDigest from plain strings. --- src/buildtool/common/repository_config.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/buildtool/common/repository_config.hpp') diff --git a/src/buildtool/common/repository_config.hpp b/src/buildtool/common/repository_config.hpp index 34918d51..3319a710 100644 --- a/src/buildtool/common/repository_config.hpp +++ b/src/buildtool/common/repository_config.hpp @@ -25,6 +25,7 @@ #include "gsl/gsl" #include "nlohmann/json.hpp" +#include "src/buildtool/common/artifact_digest.hpp" #include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/file_system/file_root.hpp" #include "src/buildtool/file_system/git_cas.hpp" @@ -140,7 +141,7 @@ class RepositoryConfig { // std::nullopt otherwise. [[nodiscard]] auto RepositoryKey(Storage const& storage, std::string const& repo) const noexcept - -> std::optional; + -> std::optional; // used for testing void Reset() { @@ -159,7 +160,7 @@ class RepositoryConfig { // Base description if content-fixed std::optional base_desc{}; // Cache key if content-fixed - AtomicValue> key{}; + AtomicValue> key{}; }; std::unordered_map repos_; -- cgit v1.2.3