mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-20 02:47:11 +03:00
Fix remaining marked as done const* cppcheck warnings
This commit is contained in:
@@ -109,7 +109,7 @@ hwlmcb_rv_t roseHandleChainMatch(const struct RoseEngine *t,
|
||||
u64a top_squash_distance, u64a end,
|
||||
char in_catchup) {
|
||||
assert(event == MQE_TOP || event >= MQE_TOP_FIRST);
|
||||
struct core_info *ci = &scratch->core_info;
|
||||
const struct core_info *ci = &scratch->core_info;
|
||||
|
||||
u8 *aa = getActiveLeafArray(t, scratch->core_info.state);
|
||||
u32 aaCount = t->activeArrayCount;
|
||||
|
||||
@@ -867,7 +867,7 @@ vector<raw_dfa> buildAnchoredDfas(RoseBuildImpl &build,
|
||||
}
|
||||
|
||||
bytecode_ptr<anchored_matcher_info>
|
||||
buildAnchoredMatcher(RoseBuildImpl &build, const vector<LitFragment> &fragments,
|
||||
buildAnchoredMatcher(const RoseBuildImpl &build, const vector<LitFragment> &fragments,
|
||||
vector<raw_dfa> &dfas) {
|
||||
const CompileContext &cc = build.cc;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ std::vector<raw_dfa> buildAnchoredDfas(RoseBuildImpl &build,
|
||||
* given in litPrograms.
|
||||
*/
|
||||
bytecode_ptr<anchored_matcher_info>
|
||||
buildAnchoredMatcher(RoseBuildImpl &build,
|
||||
buildAnchoredMatcher(const RoseBuildImpl &build,
|
||||
const std::vector<LitFragment> &fragments,
|
||||
std::vector<raw_dfa> &dfas);
|
||||
|
||||
|
||||
@@ -1229,7 +1229,7 @@ void updateTops(const RoseGraph &g, const TamaInfo &tamaInfo,
|
||||
const map<pair<const NFA *, u32>, u32> &out_top_remap,
|
||||
const bool is_suffix) {
|
||||
u32 i = 0;
|
||||
for (const auto &n : tamaInfo.subengines) {
|
||||
for (const auto *n : tamaInfo.subengines) {
|
||||
for (const auto &v : subengines[i].vertices) {
|
||||
if (is_suffix) {
|
||||
tamaProto.add(n, g[v].index, g[v].suffix.top, out_top_remap);
|
||||
@@ -2733,7 +2733,7 @@ RoseProgram makeLiteralProgram(const RoseBuildImpl &build, const build_context &
|
||||
}
|
||||
|
||||
static
|
||||
RoseProgram makeFragmentProgram(const RoseBuildImpl &build, build_context &bc,
|
||||
RoseProgram makeFragmentProgram(const RoseBuildImpl &build, const build_context &bc,
|
||||
ProgramBuild &prog_build,
|
||||
const vector<u32> &lit_ids,
|
||||
const vector<vector<RoseEdge>> &lit_edge_map) {
|
||||
|
||||
@@ -1887,7 +1887,7 @@ void mergeSmallLeftfixes(RoseBuildImpl &tbi) {
|
||||
return;
|
||||
}
|
||||
|
||||
RoseGraph &g = tbi.g;
|
||||
const RoseGraph &g = tbi.g;
|
||||
|
||||
LeftfixBouquet nfa_leftfixes;
|
||||
|
||||
@@ -2180,7 +2180,7 @@ void mergeAcyclicSuffixes(RoseBuildImpl &tbi) {
|
||||
|
||||
SuffixBouquet suffixes;
|
||||
|
||||
RoseGraph &g = tbi.g;
|
||||
const RoseGraph &g = tbi.g;
|
||||
|
||||
for (auto v : vertices_range(g)) {
|
||||
shared_ptr<NGHolder> h = g[v].suffix.graph;
|
||||
@@ -2240,7 +2240,7 @@ void mergeSmallSuffixes(RoseBuildImpl &tbi) {
|
||||
return;
|
||||
}
|
||||
|
||||
RoseGraph &g = tbi.g;
|
||||
const RoseGraph &g = tbi.g;
|
||||
SuffixBouquet suffixes;
|
||||
|
||||
for (auto v : vertices_range(g)) {
|
||||
|
||||
@@ -1356,7 +1356,7 @@ bool attemptRoseMerge(RoseBuildImpl &build, bool preds_same, RoseVertex a,
|
||||
build.g[a].index, build.g[b].index);
|
||||
assert(a != b);
|
||||
|
||||
RoseGraph &g = build.g;
|
||||
const RoseGraph &g = build.g;
|
||||
const LeftEngInfo &a_left = g[a].left;
|
||||
const LeftEngInfo &b_left = g[b].left;
|
||||
|
||||
@@ -1996,7 +1996,7 @@ void filterDiamondCandidates(const RoseGraph &g, CandidateSet &candidates) {
|
||||
|
||||
void aliasRoles(RoseBuildImpl &build, bool mergeRoses) {
|
||||
const CompileContext &cc = build.cc;
|
||||
RoseGraph &g = build.g;
|
||||
const RoseGraph &g = build.g;
|
||||
assert(!hasOrphanedTops(build));
|
||||
assert(canImplementGraphs(build));
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ enum MiracleAction roseScanForMiracles(const struct RoseEngine *t, char *state,
|
||||
struct hs_scratch *scratch, u32 qi,
|
||||
const struct LeftNfaInfo *left,
|
||||
const struct NFA *nfa) {
|
||||
struct core_info *ci = &scratch->core_info;
|
||||
const struct core_info *ci = &scratch->core_info;
|
||||
const u32 qCount = t->queueCount;
|
||||
struct mq *q = scratch->queues + qi;
|
||||
|
||||
@@ -211,7 +211,7 @@ char roseCatchUpLeftfix(const struct RoseEngine *t, char *state,
|
||||
const struct LeftNfaInfo *left) {
|
||||
assert(!left->transient); // active roses only
|
||||
|
||||
struct core_info *ci = &scratch->core_info;
|
||||
const struct core_info *ci = &scratch->core_info;
|
||||
const u32 qCount = t->queueCount;
|
||||
struct mq *q = scratch->queues + qi;
|
||||
const struct NFA *nfa = getNfaByQueue(t, qi);
|
||||
|
||||
Reference in New Issue
Block a user