aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libmain/progress-bar.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libmain/progress-bar.cc b/src/libmain/progress-bar.cc
index d83b09cd4..b837eee8a 100644
--- a/src/libmain/progress-bar.cc
+++ b/src/libmain/progress-bar.cc
@@ -414,18 +414,18 @@ public:
std::string getStatus(State & state)
{
- auto MiB = 1024.0 * 1024.0;
+ constexpr auto MiB = 1024.0 * 1024.0;
std::string res;
auto renderActivity = [&](ActivityType type, const std::string & itemFmt, const std::string & numberFmt = "%d", double unit = 1) {
auto & act = state.activitiesByType[type];
uint64_t done = act.done, expected = act.done, running = 0, failed = act.failed;
- for (auto & j : act.its) {
- done += j.second->done;
- expected += j.second->expected;
- running += j.second->running;
- failed += j.second->failed;
+ for (auto & [actId, infoIt] : act.its) {
+ done += infoIt->done;
+ expected += infoIt->expected;
+ running += infoIt->running;
+ failed += infoIt->failed;
}
expected = std::max(expected, act.expected);