summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/remote/source_tree_client.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2025-02-14 13:04:28 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2025-02-19 17:50:30 +0100
commit56df7b3916f669edd315808f92e63e7553367f1d (patch)
tree93a269402da87f33a9e95f82e540f6fef667aa6b /src/buildtool/serve_api/remote/source_tree_client.hpp
parent888573c86e2eff6d1657f42955c388cda347680d (diff)
downloadjustbuild-56df7b3916f669edd315808f92e63e7553367f1d.tar.gz
Store HashFunction by value
Although references give an additional information about ownership, they introduce additional design difficulties.
Diffstat (limited to 'src/buildtool/serve_api/remote/source_tree_client.hpp')
-rw-r--r--src/buildtool/serve_api/remote/source_tree_client.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildtool/serve_api/remote/source_tree_client.hpp b/src/buildtool/serve_api/remote/source_tree_client.hpp
index f6a49566..0d31c803 100644
--- a/src/buildtool/serve_api/remote/source_tree_client.hpp
+++ b/src/buildtool/serve_api/remote/source_tree_client.hpp
@@ -37,7 +37,7 @@ class SourceTreeClient {
public:
explicit SourceTreeClient(
ServerAddress const& address,
- gsl::not_null<HashFunction const*> const& hash_function,
+ HashFunction hash_function,
gsl::not_null<RemoteContext const*> const& remote_context) noexcept;
struct TreeResult {
@@ -141,7 +141,7 @@ class SourceTreeClient {
const noexcept -> expected<ArtifactDigest, GitLookupError>;
private:
- HashFunction const& hash_function_; // hash function of the remote
+ HashFunction hash_function_; // hash function of the remote
std::unique_ptr<justbuild::just_serve::SourceTree::Stub> stub_;
Logger logger_{"RemoteSourceTreeClient"};
};