diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2022-08-30 22:11:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-30 22:11:38 +0200 |
commit | a7ddbe7cf7983ba7d652be0202178db18d7c484d (patch) | |
tree | 4afac304dac387642e0f7828c4b1e0ce1b4b7b9a | |
parent | 4efaf1baa98ebcb78ea6bdfa7f84fb7e266bfd20 (diff) | |
parent | ea04cf32c94131d65624b7185b0ce176a35861d1 (diff) | |
download | ninja-a7ddbe7cf7983ba7d652be0202178db18d7c484d.tar.gz |
Merge pull request #2101 from ken-matsui/patch-1
Avoid shadowing `time_millis_`, the field of `StatusPrinter`
-rw-r--r-- | src/status.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/status.h b/src/status.h index e211ba3..b2e50ea 100644 --- a/src/status.h +++ b/src/status.h @@ -92,14 +92,14 @@ struct StatusPrinter : Status { double rate() { return rate_; } - void UpdateRate(int update_hint, int64_t time_millis_) { + void UpdateRate(int update_hint, int64_t time_millis) { if (update_hint == last_update_) return; last_update_ = update_hint; if (times_.size() == N) times_.pop(); - times_.push(time_millis_); + times_.push(time_millis); if (times_.back() != times_.front()) rate_ = times_.size() / ((times_.back() - times_.front()) / 1e3); } |