CastleProto: track mapping of reports to tops

This allows us to speed up report-based queries, like dedupe checking.
This commit is contained in:
Justin Viiret
2015-12-02 11:31:09 +11:00
committed by Matthew Barr
parent da23e8306a
commit 8427d83780
2 changed files with 35 additions and 16 deletions

View File

@@ -81,6 +81,9 @@ struct CastleProto {
/** \brief Mapping from unique top id to repeat. */
std::map<u32, PureRepeat> repeats;
/** \brief Mapping from report to associated tops. */
ue2::unordered_map<ReportID, flat_set<u32>> report_map;
};
std::set<ReportID> all_reports(const CastleProto &proto);