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
@@ -42,6 +42,7 @@
|
||||
#include "rose_in_graph.h"
|
||||
#include "util/alloc.h"
|
||||
#include "util/charreach.h"
|
||||
#include "util/ue2_containers.h"
|
||||
#include "util/ue2string.h"
|
||||
|
||||
#include <memory>
|
||||
@@ -72,8 +73,8 @@ public:
|
||||
|
||||
/** \brief True if we can not establish that at most a single callback will
|
||||
* be generated at a given offset from this set of reports. */
|
||||
virtual bool requiresDedupeSupport(const std::set<ReportID> &reports) const
|
||||
= 0;
|
||||
virtual bool requiresDedupeSupport(const ue2::flat_set<ReportID> &reports)
|
||||
const = 0;
|
||||
};
|
||||
|
||||
/** \brief Abstract interface intended for callers from elsewhere in the tree,
|
||||
|
@@ -538,7 +538,7 @@ u32 RoseBuildImpl::getNewLiteralId() {
|
||||
}
|
||||
|
||||
static
|
||||
bool requiresDedupe(const NGHolder &h, const set<ReportID> &reports,
|
||||
bool requiresDedupe(const NGHolder &h, const ue2::flat_set<ReportID> &reports,
|
||||
const Grey &grey) {
|
||||
/* TODO: tighten */
|
||||
NFAVertex seen_vert = NFAGraph::null_vertex();
|
||||
@@ -581,13 +581,14 @@ bool requiresDedupe(const NGHolder &h, const set<ReportID> &reports,
|
||||
class RoseDedupeAuxImpl : public RoseDedupeAux {
|
||||
public:
|
||||
explicit RoseDedupeAuxImpl(const RoseBuildImpl &tbi_in);
|
||||
bool requiresDedupeSupport(const set<ReportID> &reports) const override;
|
||||
bool requiresDedupeSupport(
|
||||
const ue2::flat_set<ReportID> &reports) const override;
|
||||
|
||||
const RoseBuildImpl &tbi;
|
||||
map<ReportID, set<RoseVertex> > vert_map;
|
||||
map<ReportID, set<suffix_id> > suffix_map;
|
||||
map<ReportID, set<const OutfixInfo *> > outfix_map;
|
||||
map<ReportID, set<const raw_puff *> > puff_map;
|
||||
map<ReportID, set<RoseVertex>> vert_map;
|
||||
map<ReportID, set<suffix_id>> suffix_map;
|
||||
map<ReportID, set<const OutfixInfo *>> outfix_map;
|
||||
map<ReportID, set<const raw_puff *>> puff_map;
|
||||
};
|
||||
|
||||
unique_ptr<RoseDedupeAux> RoseBuildImpl::generateDedupeAux() const {
|
||||
@@ -644,8 +645,8 @@ RoseDedupeAuxImpl::RoseDedupeAuxImpl(const RoseBuildImpl &tbi_in)
|
||||
}
|
||||
}
|
||||
|
||||
bool RoseDedupeAuxImpl::requiresDedupeSupport(const set<ReportID> &reports)
|
||||
const {
|
||||
bool RoseDedupeAuxImpl::requiresDedupeSupport(
|
||||
const ue2::flat_set<ReportID> &reports) const {
|
||||
/* TODO: this could be expanded to check for offset or character
|
||||
constraints */
|
||||
|
||||
|
Reference in New Issue
Block a user