summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--troublemaker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/troublemaker.cpp b/troublemaker.cpp index d924894..04417d7 100644 --- a/troublemaker.cpp +++ b/troublemaker.cpp
@@ -184,7 +184,7 @@ int main(int argc, char** argv)
184 std::lock_guard<std::mutex> stats_guard(stats_mutex); 184 std::lock_guard<std::mutex> stats_guard(stats_mutex);
185 std::ofstream datafile("data.txt", std::ofstream::out | std::ofstream::trunc); 185 std::ofstream datafile("data.txt", std::ofstream::out | std::ofstream::trunc);
186 186
187 for (auto mapping : stats) 187 for (auto& mapping : stats)
188 { 188 {
189 auto& s = mapping.second; 189 auto& s = mapping.second;
190 if (s.days < 7) 190 if (s.days < 7)
@@ -198,6 +198,7 @@ int main(int argc, char** argv)
198 s.day4 = s.day3; 198 s.day4 = s.day3;
199 s.day3 = s.day2; 199 s.day3 = s.day2;
200 s.day2 = s.day1; 200 s.day2 = s.day1;
201 s.day1 = 0;
201 202
202 s.total = s.day2 + s.day3 + s.day4 + s.day5 + s.day6 + s.day7; 203 s.total = s.day2 + s.day3 + s.day4 + s.day5 + s.day6 + s.day7;
203 204