From 56df7b3916f669edd315808f92e63e7553367f1d Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Fri, 14 Feb 2025 13:04:28 +0100 Subject: Store HashFunction by value Although references give an additional information about ownership, they introduce additional design difficulties. --- src/buildtool/serve_api/remote/source_tree_client.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/buildtool/serve_api/remote/source_tree_client.hpp') 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 const& hash_function, + HashFunction hash_function, gsl::not_null const& remote_context) noexcept; struct TreeResult { @@ -141,7 +141,7 @@ class SourceTreeClient { const noexcept -> expected; private: - HashFunction const& hash_function_; // hash function of the remote + HashFunction hash_function_; // hash function of the remote std::unique_ptr stub_; Logger logger_{"RemoteSourceTreeClient"}; }; -- cgit v1.2.3