tidy: "ue2::flat_set/map" -> "flat_set/map"

This commit is contained in:
Justin Viiret
2017-07-19 11:20:39 +10:00
committed by Matthew Barr
parent 9cf66b6ac9
commit 33823d60d1
23 changed files with 65 additions and 70 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2016, Intel Corporation
* Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -48,7 +48,7 @@ namespace ue2 {
static
bool findMask(const NGHolder &g, vector<CharReach> *mask, bool *anchored,
ue2::flat_set<ReportID> *reports) {
flat_set<ReportID> *reports) {
DEBUG_PRINTF("looking for a mask pattern\n");
set<NFAVertex> s_succ;
insert(&s_succ, adjacent_vertices(g.start, g));
@@ -117,7 +117,7 @@ bool handleFixedWidth(RoseBuild &rose, const NGHolder &g, const Grey &grey) {
return false;
}
ue2::flat_set<ReportID> reports;
flat_set<ReportID> reports;
bool anchored = false;
vector<CharReach> mask;

View File

@@ -67,7 +67,7 @@ struct NFAGraphEdgeProps {
/** \brief For graphs that will be implemented as multi-top engines, this
* specifies the top events. Only used on edges from the start vertex. */
ue2::flat_set<u32> tops;
flat_set<u32> tops;
/** \brief Flags associated with assertions. */
u32 assert_flags = 0;

View File

@@ -335,7 +335,7 @@ struct DAccelScheme {
return false;
}
ue2::flat_set<std::pair<u8, u8> > double_byte;
flat_set<pair<u8, u8>> double_byte;
CharReach double_cr;
u32 double_offset = 0;
};

View File

@@ -57,8 +57,7 @@ struct CompileContext;
void findAccelFriends(const NGHolder &g, NFAVertex v,
const std::map<NFAVertex, BoundedRepeatSummary> &br_cyclic,
u32 offset,
ue2::flat_set<NFAVertex> *friends);
u32 offset, flat_set<NFAVertex> *friends);
#define DOUBLE_SHUFTI_LIMIT 20

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2016, Intel Corporation
* Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -192,7 +192,7 @@ struct PathMask {
}
vector<CharReach> mask;
ue2::flat_set<ReportID> reports;
flat_set<ReportID> reports;
bool is_anchored;
bool is_eod;
};

View File

@@ -1598,7 +1598,7 @@ vector<CharReach> getUnionedTrigger(const NGHolder &g, const NFAVertex v) {
vector<CharReach> trigger;
ue2::flat_set<NFAVertex> curr, next;
flat_set<NFAVertex> curr, next;
insert(&curr, inv_adjacent_vertices(v, g));
if (contains(curr, g.start)) {
@@ -2234,7 +2234,7 @@ void analyseRepeats(NGHolder &g, const ReportManager *rm,
#ifndef NDEBUG
// So we can assert that the number of tops hasn't changed at the end of
// this analysis.
const ue2::flat_set<u32> allTops = getTops(g);
const flat_set<u32> allTops = getTops(g);
#endif
// Later on, we're (a little bit) dependent on depth information for

View File

@@ -100,7 +100,7 @@ bool operator<(const sls_literal &a, const sls_literal &b) {
static
bool checkLongMixedSensitivityLiterals(
const map<sls_literal, ue2::flat_set<ReportID>> &literals) {
const map<sls_literal, flat_set<ReportID>> &literals) {
const size_t len = MAX_MASK2_WIDTH;
for (const sls_literal &lit : literals | map_keys) {
@@ -114,7 +114,7 @@ bool checkLongMixedSensitivityLiterals(
static
bool findLiterals(const NGHolder &g,
map<sls_literal, ue2::flat_set<ReportID>> *literals) {
map<sls_literal, flat_set<ReportID>> *literals) {
vector<NFAVertex> order = getTopoOrdering(g);
vector<set<sls_literal>> built(num_vertices(g));
@@ -198,7 +198,7 @@ bool findLiterals(const NGHolder &g,
}
static
size_t min_period(const map<sls_literal, ue2::flat_set<ReportID>> &literals) {
size_t min_period(const map<sls_literal, flat_set<ReportID>> &literals) {
size_t rv = SIZE_MAX;
for (const sls_literal &lit : literals | map_keys) {
@@ -229,7 +229,7 @@ bool handleSmallLiteralSets(RoseBuild &rose, const NGHolder &g,
DEBUG_PRINTF("looking for literals\n");
map<sls_literal, ue2::flat_set<ReportID>> literals;
map<sls_literal, flat_set<ReportID>> literals;
if (!findLiterals(g, &literals)) {
DEBUG_PRINTF(":(\n");
return false;

View File

@@ -267,7 +267,7 @@ bool validateEXSL(const NGHolder &g,
const vector<CharReach> escapes_vec(1, escapes);
const vector<CharReach> notescapes_vec(1, ~escapes);
ue2::flat_set<NFAVertex> states;
flat_set<NFAVertex> states;
/* turn on all states past the prefix */
DEBUG_PRINTF("region %u is cutover\n", region);
for (auto v : vertices_range(g)) {
@@ -280,7 +280,7 @@ bool validateEXSL(const NGHolder &g,
states = execute_graph(g, escapes_vec, states);
/* flood with any number of not escapes */
ue2::flat_set<NFAVertex> prev_states;
flat_set<NFAVertex> prev_states;
while (prev_states != states) {
prev_states = states;
states = execute_graph(g, notescapes_vec, states);
@@ -290,7 +290,7 @@ bool validateEXSL(const NGHolder &g,
/* find input starts to use for when we are running the prefix through as
* when the escape character arrives we may be in matching the prefix
* already */
ue2::flat_set<NFAVertex> prefix_start_states;
flat_set<NFAVertex> prefix_start_states;
for (auto v : vertices_range(prefix)) {
if (v != prefix.accept && v != prefix.acceptEod
/* and as we have already made it past the prefix once */

View File

@@ -450,8 +450,8 @@ void appendLiteral(NGHolder &h, const ue2_literal &s) {
}
}
ue2::flat_set<u32> getTops(const NGHolder &h) {
ue2::flat_set<u32> tops;
flat_set<u32> getTops(const NGHolder &h) {
flat_set<u32> tops;
for (const auto &e : out_edges_range(h.start, h)) {
insert(&tops, h[e].tops);
}