summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/remote/bazel
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2025-02-11 14:00:42 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2025-02-12 09:49:39 +0100
commit3a5a02e0c48957c3a66130abdae0ff7b3d12905f (patch)
treee0bca8c8300d9f594016b32c66366ecd3ed75ac8 /src/buildtool/execution_api/remote/bazel
parent736571bd63aa129e7601182183faa34fd58888d1 (diff)
downloadjustbuild-3a5a02e0c48957c3a66130abdae0ff7b3d12905f.tar.gz
BackMap: make non-copyable and non-movable
...and use std::unique_ptr for construction instead of std::optional.
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel')
-rw-r--r--src/buildtool/execution_api/remote/bazel/bazel_cas_client.cpp4
-rw-r--r--src/buildtool/execution_api/remote/bazel/bazel_network.cpp2
-rw-r--r--src/buildtool/execution_api/remote/bazel/bazel_network_reader.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_cas_client.cpp b/src/buildtool/execution_api/remote/bazel/bazel_cas_client.cpp
index 566b9a29..8384cdac 100644
--- a/src/buildtool/execution_api/remote/bazel/bazel_cas_client.cpp
+++ b/src/buildtool/execution_api/remote/bazel/bazel_cas_client.cpp
@@ -237,7 +237,7 @@ auto BazelCasClient::BatchReadBlobs(
auto const back_map = BackMap<bazel_re::Digest, ArtifactDigest>::Make(
&blobs, ArtifactDigestFactory::ToBazel);
- if (not back_map.has_value()) {
+ if (back_map == nullptr) {
return result;
}
@@ -494,7 +494,7 @@ auto BazelCasClient::FindMissingBlobs(
auto const back_map = BackMap<bazel_re::Digest, ArtifactDigest>::Make(
&digests, ArtifactDigestFactory::ToBazel);
- if (not back_map.has_value()) {
+ if (back_map == nullptr) {
return digests;
}
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_network.cpp b/src/buildtool/execution_api/remote/bazel/bazel_network.cpp
index f7aa3dcc..d2a84c04 100644
--- a/src/buildtool/execution_api/remote/bazel/bazel_network.cpp
+++ b/src/buildtool/execution_api/remote/bazel/bazel_network.cpp
@@ -122,7 +122,7 @@ auto BazelNetwork::UploadBlobs(std::unordered_set<ArtifactBlob>&& blobs,
if (not skip_find_missing) {
auto const back_map = BackMap<ArtifactDigest, ArtifactBlob>::Make(
&blobs, [](ArtifactBlob const& blob) { return blob.digest; });
- if (not back_map.has_value()) {
+ if (back_map == nullptr) {
return false;
}
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_network_reader.cpp b/src/buildtool/execution_api/remote/bazel/bazel_network_reader.cpp
index 1464c134..46bb151b 100644
--- a/src/buildtool/execution_api/remote/bazel/bazel_network_reader.cpp
+++ b/src/buildtool/execution_api/remote/bazel/bazel_network_reader.cpp
@@ -195,7 +195,7 @@ auto BazelNetworkReader::BatchReadBlobs(
auto const back_map = BackMap<ArtifactDigest, ArtifactBlob>::Make(
&batched_blobs, [](ArtifactBlob const& blob) { return blob.digest; });
- if (not back_map.has_value()) {
+ if (back_map == nullptr) {
return {};
}