report_manager: use unordered externalIdMap

This commit is contained in:
Justin Viiret 2017-04-24 14:40:47 +10:00 committed by Matthew Barr
parent 1287b70f4b
commit 1878b9a857
2 changed files with 5 additions and 3 deletions

View File

@ -174,8 +174,9 @@ u32 ReportManager::getDkey(const Report &r) const {
void ReportManager::registerExtReport(ReportID id,
const external_report_info &ext) {
if (contains(externalIdMap, id)) {
const external_report_info &eri = externalIdMap.at(id);
auto it = externalIdMap.find(id);
if (it != externalIdMap.end()) {
const external_report_info &eri = it->second;
if (eri.highlander != ext.highlander) {
/* we have a problem */
ostringstream out;

View File

@ -38,6 +38,7 @@
#include "util/compile_error.h"
#include "util/noncopyable.h"
#include "util/report.h"
#include "util/ue2_containers.h"
#include <map>
#include <set>
@ -140,7 +141,7 @@ private:
/** \brief Mapping from external match ids to information about that
* id. */
std::map<ReportID, external_report_info> externalIdMap;
unordered_map<ReportID, external_report_info> externalIdMap;
/** \brief Mapping from expression index to exhaustion key. */
std::map<s64a, u32> toExhaustibleKeyMap;