From 54520575cd11250ecf5d115b74fce5b8acd3e1aa Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 20 Jun 2017 16:01:15 -0400 Subject: Assert precondition in BuildStatus::BuildEdgeStarted This method should be called only with edges that have not already been started. --- src/build.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/build.cc b/src/build.cc index b392803..90e910f 100644 --- a/src/build.cc +++ b/src/build.cc @@ -97,6 +97,7 @@ void BuildStatus::PlanHasTotalEdges(int total) { } void BuildStatus::BuildEdgeStarted(Edge* edge) { + assert(running_edges_.find(edge) == running_edges_.end()); int start_time = (int)(GetTimeMillis() - start_time_millis_); running_edges_.insert(make_pair(edge, start_time)); ++started_edges_; -- cgit v0.12