refactor.重构哈希计算的调用逻辑

This commit is contained in:
MistEO
2022-01-17 23:55:55 +08:00
parent 51f511aec9
commit 8b593d4b9d
14 changed files with 80 additions and 190 deletions

View File

@@ -103,7 +103,7 @@ bool asst::TaskData::parse(const json::value& json)
for (const json::value& hash : task_json.at("hash").as_array()) {
hash_task_info_ptr->hashs.emplace_back(hash.as_string());
}
hash_task_info_ptr->hamming_threshold = task_json.get("threshold", 0.0);
hash_task_info_ptr->dist_threshold = task_json.get("threshold", 0.0);
if (task_json.exist("maskRange")) {
hash_task_info_ptr->mask_range = std::make_pair(
task_json.at("maskRange")[0].as_integer(),
@@ -217,4 +217,4 @@ bool asst::TaskData::parse(const json::value& json)
}
#endif
return true;
}
}