Don't shadow names

This commit is contained in:
Matthew Barr
2016-07-25 15:33:40 +10:00
parent 68ae4cc7c8
commit cbd115f7fe
12 changed files with 70 additions and 71 deletions

View File

@@ -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);

View File

@@ -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;