diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-11 14:00:42 +0100 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2025-02-12 09:49:39 +0100 |
commit | 3a5a02e0c48957c3a66130abdae0ff7b3d12905f (patch) | |
tree | e0bca8c8300d9f594016b32c66366ecd3ed75ac8 /src/buildtool/execution_api/remote/bazel | |
parent | 736571bd63aa129e7601182183faa34fd58888d1 (diff) | |
download | justbuild-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')
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 {}; } |