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.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/buildtool/serve_api/remote/source_tree_client.cpp') diff --git a/src/buildtool/serve_api/remote/source_tree_client.cpp b/src/buildtool/serve_api/remote/source_tree_client.cpp index bdf3fa57..e24f2db8 100644 --- a/src/buildtool/serve_api/remote/source_tree_client.cpp +++ b/src/buildtool/serve_api/remote/source_tree_client.cpp @@ -68,9 +68,9 @@ auto PragmaSpecialToSymlinksResolve( SourceTreeClient::SourceTreeClient( ServerAddress const& address, - gsl::not_null const& hash_function, + HashFunction hash_function, gsl::not_null const& remote_context) noexcept - : hash_function_{*hash_function} { + : hash_function_{hash_function} { stub_ = justbuild::just_serve::SourceTree::NewStub(CreateChannelWithCredentials( address.host, address.port, remote_context->auth)); -- cgit v1.2.3