summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/serve_service/source_tree.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-25 14:53:18 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-30 12:10:06 +0200
commit8669d48933731f224474a9b1dc55824f87ae26a7 (patch)
tree7d097fdf3f89e5fc88899c8e7f4723a4870f3e60 /src/buildtool/serve_api/serve_service/source_tree.hpp
parent69f56ad981da59f026c83b321522ad68283934c5 (diff)
downloadjustbuild-8669d48933731f224474a9b1dc55824f87ae26a7.tar.gz
Use LocalContext in execution and serve services
The context is passed by not_null const pointer in order to avoid binding to temporaries, and it or parts of it get stored by const ref where needed.
Diffstat (limited to 'src/buildtool/serve_api/serve_service/source_tree.hpp')
-rw-r--r--src/buildtool/serve_api/serve_service/source_tree.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildtool/serve_api/serve_service/source_tree.hpp b/src/buildtool/serve_api/serve_service/source_tree.hpp
index 2f6d649c..288e7da8 100644
--- a/src/buildtool/serve_api/serve_service/source_tree.hpp
+++ b/src/buildtool/serve_api/serve_service/source_tree.hpp
@@ -29,6 +29,7 @@
#include "src/buildtool/common/remote/remote_common.hpp"
#include "src/buildtool/execution_api/common/api_bundle.hpp"
#include "src/buildtool/execution_api/common/execution_api.hpp"
+#include "src/buildtool/execution_api/local/context.hpp"
#include "src/buildtool/execution_api/remote/config.hpp"
#include "src/buildtool/file_system/git_types.hpp"
#include "src/buildtool/file_system/symlinks_map/pragma_special.hpp"
@@ -61,12 +62,11 @@ class SourceTreeService final
explicit SourceTreeService(
gsl::not_null<RemoteServeConfig const*> const& serve_config,
- gsl::not_null<StorageConfig const*> const& storage_config,
- gsl::not_null<Storage const*> const& storage,
+ gsl::not_null<LocalContext const*> const& local_context,
gsl::not_null<ApiBundle const*> const& apis) noexcept
: serve_config_{*serve_config},
- storage_{*storage},
- storage_config_{*storage_config},
+ storage_{*local_context->storage},
+ storage_config_{*local_context->storage_config},
apis_{*apis} {}
// Retrieve the Git-subtree identifier from a given Git commit.