summaryrefslogtreecommitdiffstats
path: root/src/server/CompiledGraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/CompiledGraph.cpp')
-rw-r--r--src/server/CompiledGraph.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/server/CompiledGraph.cpp b/src/server/CompiledGraph.cpp
index 73468481..57c4537c 100644
--- a/src/server/CompiledGraph.cpp
+++ b/src/server/CompiledGraph.cpp
@@ -94,13 +94,11 @@ CompiledGraph::compile(GraphImpl& graph)
static size_t
num_unvisited_dependants(const BlockImpl* block)
{
- size_t count = 0;
- for (const BlockImpl* b : block->dependants()) {
- if (b->get_mark() == BlockImpl::Mark::UNVISITED) {
- ++count;
- }
- }
- return count;
+ return std::count_if(block->dependants().begin(),
+ block->dependants().end(),
+ [](const auto* b) {
+ return b->get_mark() == BlockImpl::Mark::UNVISITED;
+ });
}
static size_t