From 1d4c65f2fd9f3b66f64838bb11e663aed95dcc1f Mon Sep 17 00:00:00 2001 From: Konstantin Kharlamov Date: Tue, 22 Oct 2019 22:19:17 +0300 Subject: build.cc: constify BuildStatus Signed-off-by: Konstantin Kharlamov --- src/build.cc | 4 ++-- src/build.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/build.cc b/src/build.cc index 771ec85..75671a6 100644 --- a/src/build.cc +++ b/src/build.cc @@ -96,7 +96,7 @@ void BuildStatus::PlanHasTotalEdges(int total) { total_edges_ = total; } -void BuildStatus::BuildEdgeStarted(Edge* edge) { +void BuildStatus::BuildEdgeStarted(const 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)); @@ -290,7 +290,7 @@ string BuildStatus::FormatProgressStatus( return out; } -void BuildStatus::PrintStatus(Edge* edge, EdgeStatus status) { +void BuildStatus::PrintStatus(const Edge* edge, EdgeStatus status) { if (config_.verbosity == BuildConfig::QUIET) return; diff --git a/src/build.h b/src/build.h index f8d877b..97773c4 100644 --- a/src/build.h +++ b/src/build.h @@ -240,7 +240,7 @@ struct Builder { struct BuildStatus { explicit BuildStatus(const BuildConfig& config); void PlanHasTotalEdges(int total); - void BuildEdgeStarted(Edge* edge); + void BuildEdgeStarted(const Edge* edge); void BuildEdgeFinished(Edge* edge, bool success, const string& output, int* start_time, int* end_time); void BuildLoadDyndeps(); @@ -261,7 +261,7 @@ struct BuildStatus { EdgeStatus status) const; private: - void PrintStatus(Edge* edge, EdgeStatus status); + void PrintStatus(const Edge* edge, EdgeStatus status); const BuildConfig& config_; -- cgit v0.12