1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2024-11-25 00:53:43 +00:00

Fix off-by-one error.

Also use undordered_set instead of set.
This commit is contained in:
King_DuckZ 2016-07-11 17:47:00 +01:00
parent e5007cf96f
commit e3fa82006f
2 changed files with 2 additions and 2 deletions

View file

@ -176,7 +176,7 @@ namespace dindb {
"content_type", parSetData.content_type
);
for (auto z = base_file_id; z < casted_data_size; ++z) {
for (auto z = base_file_id; z < casted_data_size + 1; ++z) {
const std::string file_key = PROGRAM_NAME ":file:" + lexical_cast<std::string>(z);
const auto& file_data = parData[z - base_file_id];
const std::string hash = tiger_to_string(file_data.hash);

View file

@ -146,7 +146,7 @@ namespace dindb {
const auto regexes = compile_regexes(parRegexes);
std::set<std::string> dele_tags;
std::unordered_set<std::string> dele_tags;
std::vector<FileIDType> ids;
for (const auto& itm : parRedis.scan(PROGRAM_NAME ":file:*")) {