mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
dfa: standardise 'using' instead of typedef
This commit is contained in:
parent
0d7d52625c
commit
85f7790a21
@ -53,8 +53,8 @@ namespace {
|
||||
|
||||
class Automaton_Merge {
|
||||
public:
|
||||
typedef vector<u16> StateSet;
|
||||
typedef ue2::unordered_map<StateSet, dstate_id_t> StateMap;
|
||||
using StateSet = vector<u16>;
|
||||
using StateMap = unordered_map<StateSet, dstate_id_t>;
|
||||
|
||||
Automaton_Merge(const raw_dfa *rdfa1, const raw_dfa *rdfa2,
|
||||
const ReportManager *rm_in, const Grey &grey_in)
|
||||
|
@ -285,8 +285,8 @@ public:
|
||||
|
||||
class Automaton_Haig_Merge {
|
||||
public:
|
||||
typedef vector<u16> StateSet;
|
||||
typedef ue2::unordered_map<StateSet, dstate_id_t> StateMap;
|
||||
using StateSet = vector<u16>;
|
||||
using StateMap = unordered_map<StateSet, dstate_id_t>;
|
||||
|
||||
explicit Automaton_Haig_Merge(const vector<const raw_som_dfa *> &in)
|
||||
: nfas(in.begin(), in.end()), dead(in.size()) {
|
||||
@ -515,7 +515,7 @@ bool doHaig(const NGHolder &g, som_type som,
|
||||
raw_som_dfa *rdfa) {
|
||||
u32 state_limit = HAIG_FINAL_DFA_STATE_LIMIT; /* haig never backs down from
|
||||
a fight */
|
||||
typedef typename Auto::StateSet StateSet;
|
||||
using StateSet = typename Auto::StateSet;
|
||||
vector<StateSet> nfa_state_map;
|
||||
Auto n(g, som, triggers, unordered_som);
|
||||
try {
|
||||
@ -721,7 +721,7 @@ unique_ptr<raw_som_dfa> attemptToMergeHaig(const vector<const raw_som_dfa *> &df
|
||||
}
|
||||
}
|
||||
|
||||
typedef Automaton_Haig_Merge::StateSet StateSet;
|
||||
using StateSet = Automaton_Haig_Merge::StateSet;
|
||||
vector<StateSet> nfa_state_map;
|
||||
auto rdfa = ue2::make_unique<raw_som_dfa>(dfas[0]->kind, unordered_som,
|
||||
NODE_START,
|
||||
|
@ -274,7 +274,7 @@ u32 anchoredStateSize(const anchored_matcher_info &atable) {
|
||||
|
||||
namespace {
|
||||
|
||||
typedef bitfield<ANCHORED_NFA_STATE_LIMIT> nfa_state_set;
|
||||
using nfa_state_set = bitfield<ANCHORED_NFA_STATE_LIMIT>;
|
||||
|
||||
struct Holder_StateSet {
|
||||
Holder_StateSet() : wdelay(0) {}
|
||||
@ -296,8 +296,8 @@ size_t hash_value(const Holder_StateSet &s) {
|
||||
|
||||
class Automaton_Holder {
|
||||
public:
|
||||
typedef Holder_StateSet StateSet;
|
||||
typedef ue2::unordered_map<StateSet, dstate_id_t> StateMap;
|
||||
using StateSet = Holder_StateSet;
|
||||
using StateMap = unordered_map<StateSet, dstate_id_t>;
|
||||
|
||||
explicit Automaton_Holder(const NGHolder &g_in) : g(g_in) {
|
||||
for (auto v : vertices_range(g)) {
|
||||
|
@ -79,9 +79,8 @@ never_inline
|
||||
bool determinise(Auto &n, std::vector<ds> &dstates, size_t state_limit,
|
||||
std::vector<typename Auto::StateSet> *statesets_out = nullptr) {
|
||||
DEBUG_PRINTF("the determinator\n");
|
||||
typedef typename Auto::StateSet StateSet;
|
||||
typedef typename Auto::StateMap DstateIdMap;
|
||||
DstateIdMap dstate_ids;
|
||||
using StateSet = typename Auto::StateSet;
|
||||
typename Auto::StateMap dstate_ids;
|
||||
|
||||
const size_t alphabet_size = n.alphasize;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user