summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/common/artifact.hpp8
-rw-r--r--src/buildtool/common/artifact_digest.hpp6
-rw-r--r--src/buildtool/execution_api/remote/bazel/bazel_api.cpp8
3 files changed, 2 insertions, 20 deletions
diff --git a/src/buildtool/common/artifact.hpp b/src/buildtool/common/artifact.hpp
index 56c05e2f..ec36964e 100644
--- a/src/buildtool/common/artifact.hpp
+++ b/src/buildtool/common/artifact.hpp
@@ -48,14 +48,6 @@ class Artifact {
return not(*this == other);
}
- [[nodiscard]] auto operator<(ObjectInfo const& other) const -> bool {
- return (digest < other.digest) or
- ((digest == other.digest) and (type < other.type)) or
- ((digest == other.digest) and (type == other.type) and
- (static_cast<int>(failed) <
- static_cast<int>(other.failed)));
- }
-
// Create string of the form '[hash:size:type]'
[[nodiscard]] auto ToString(bool size_unknown = false) const noexcept
-> std::string {
diff --git a/src/buildtool/common/artifact_digest.hpp b/src/buildtool/common/artifact_digest.hpp
index d7683d60..93c41464 100644
--- a/src/buildtool/common/artifact_digest.hpp
+++ b/src/buildtool/common/artifact_digest.hpp
@@ -106,12 +106,6 @@ class ArtifactDigest final {
return std::nullopt;
}
- [[nodiscard]] auto operator<(ArtifactDigest const& other) const -> bool {
- return (hash_ < other.hash_) or
- ((hash_ == other.hash_) and (static_cast<int>(is_tree_) <
- static_cast<int>(other.is_tree_)));
- }
-
private:
std::size_t size_{};
std::string hash_{};
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
index e1d57b9b..ee672503 100644
--- a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
+++ b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
@@ -384,20 +384,16 @@ auto BazelApi::CreateAction(
bool use_blob_splitting,
gsl::not_null<std::unordered_set<Artifact::ObjectInfo>*> done)
const noexcept -> bool {
-
- std::vector<Artifact::ObjectInfo> artifacts_info{};
+ std::unordered_set<Artifact::ObjectInfo> artifacts_info;
artifacts_info.reserve(all_artifacts_info.size());
for (auto const& info : all_artifacts_info) {
if (not done->contains(info)) {
- artifacts_info.emplace_back(info);
+ artifacts_info.insert(info);
}
}
if (artifacts_info.empty()) {
return true; // Nothing to do
}
- std::sort(artifacts_info.begin(), artifacts_info.end());
- auto last_info = std::unique(artifacts_info.begin(), artifacts_info.end());
- artifacts_info.erase(last_info, artifacts_info.end());
// Determine missing artifacts in other CAS.
auto missing_artifacts_info = GetMissingArtifactsInfo<Artifact::ObjectInfo>(