mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
Don't shadow names
This commit is contained in:
@@ -195,18 +195,18 @@ struct OffsetIDFromEndOrder {
|
||||
|
||||
static
|
||||
void fillHashes(const vector<hwlmLiteral> &long_lits, size_t max_len,
|
||||
FDRSHashEntry *tab, size_t numEntries, MODES m,
|
||||
FDRSHashEntry *tab, size_t numEntries, MODES mode,
|
||||
map<u32, u32> &litToOffsetVal) {
|
||||
const u32 nbits = lg2(numEntries);
|
||||
map<u32, deque<pair<u32, u32> > > bucketToLitOffPairs;
|
||||
map<u32, u64a> bucketToBitfield;
|
||||
|
||||
for (const auto &lit : long_lits) {
|
||||
if ((m == CASELESS) != lit.nocase) {
|
||||
if ((mode == CASELESS) != lit.nocase) {
|
||||
continue;
|
||||
}
|
||||
for (u32 j = 1; j < lit.s.size() - max_len + 1; j++) {
|
||||
u32 h = hashLit(lit, j, max_len, m);
|
||||
u32 h = hashLit(lit, j, max_len, mode);
|
||||
u32 h_ent = h & ((1U << nbits) - 1);
|
||||
u32 h_low = (h >> nbits) & 63;
|
||||
bucketToLitOffPairs[h_ent].emplace_back(lit.id, j);
|
||||
|
@@ -266,9 +266,9 @@ bool TeddyCompiler::pack(map<BucketIndex,
|
||||
|
||||
u32 bucket_id = 0;
|
||||
for (const TeddySet &ts : sts) {
|
||||
const auto &lits = ts.getLits();
|
||||
const auto &ts_lits = ts.getLits();
|
||||
auto &bucket_lits = bucketToLits[bucket_id];
|
||||
bucket_lits.insert(end(bucket_lits), begin(lits), end(lits));
|
||||
bucket_lits.insert(end(bucket_lits), begin(ts_lits), end(ts_lits));
|
||||
bucket_id++;
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user