mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
assignDkeys: use flat_set<ReportID>, not set
This commit is contained in:
committed by
Matthew Barr
parent
8dac64d1dc
commit
da23e8306a
@@ -894,7 +894,8 @@ bool is_equal(const CastleProto &c1, const CastleProto &c2) {
|
||||
return c1.repeats == c2.repeats;
|
||||
}
|
||||
|
||||
bool requiresDedupe(const CastleProto &proto, const set<ReportID> &reports) {
|
||||
bool requiresDedupe(const CastleProto &proto,
|
||||
const ue2::flat_set<ReportID> &reports) {
|
||||
ue2::unordered_set<ReportID> seen;
|
||||
for (const PureRepeat &pr : proto.repeats | map_values) {
|
||||
for (const ReportID &report : pr.reports) {
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#include "nfagraph/ng_repeat.h"
|
||||
#include "util/alloc.h"
|
||||
#include "util/depth.h"
|
||||
#include "util/ue2_containers.h"
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@@ -135,7 +136,8 @@ bool is_equal(const CastleProto &c1, const CastleProto &c2);
|
||||
* \brief True if the given castle contains more than a single instance of any
|
||||
* of the reports in the given set.
|
||||
*/
|
||||
bool requiresDedupe(const CastleProto &proto, const std::set<ReportID> &reports);
|
||||
bool requiresDedupe(const CastleProto &proto,
|
||||
const ue2::flat_set<ReportID> &reports);
|
||||
|
||||
/**
|
||||
* \brief Build an NGHolder from a CastleProto.
|
||||
|
Reference in New Issue
Block a user