From 0a8dbe086a23bbb905514007d21e2e04cdaae1e8 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 4 Feb 2025 18:26:39 +0100 Subject: IExecutionApi: Use unordered_set in IsAvailable --- test/buildtool/execution_engine/executor/executor.test.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test/buildtool/execution_engine/executor/executor.test.cpp') diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp index a20a377f..b36e5fba 100644 --- a/test/buildtool/execution_engine/executor/executor.test.cpp +++ b/test/buildtool/execution_engine/executor/executor.test.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -248,13 +249,14 @@ class TestApi : public IExecutionApi { return false; } } - [[nodiscard]] auto IsAvailable(std::vector const& digests) - const noexcept -> std::vector final { - std::vector result; + [[nodiscard]] auto IsAvailable( + std::unordered_set const& digests) const noexcept + -> std::unordered_set final { + std::unordered_set result; try { for (auto const& digest : digests) { if (not config_.artifacts.at(digest.hash()).available) { - result.push_back(digest); + result.emplace(digest); } } } catch (std::exception const& /* unused */) { -- cgit v1.2.3