maintain castle report information

This commit is contained in:
Alex Coyte 2017-08-16 16:36:12 +10:00 committed by Matthew Barr
parent ea2e85ac87
commit d6c050abd6

View File

@ -772,9 +772,13 @@ void pruneCastle(CastleProto &castle, ReportID report) {
/** \brief Set all reports to the given one. */ /** \brief Set all reports to the given one. */
static static
void setReports(CastleProto &castle, ReportID report) { void setReports(CastleProto &castle, ReportID report) {
for (auto &repeat : castle.repeats | map_values) { castle.report_map.clear();
for (auto &e : castle.repeats) {
u32 top = e.first;
auto &repeat = e.second;
repeat.reports.clear(); repeat.reports.clear();
repeat.reports.insert(report); repeat.reports.insert(report);
castle.report_map[report].insert(top);
} }
} }