fixed compilation error with disable_debug_log flag

This commit is contained in:
Izik Abramov
2017-12-05 15:35:26 +02:00
committed by Felipe Zimmerle
parent 81e1cdced3
commit e9f3312ea9
5 changed files with 32 additions and 4 deletions

View File

@@ -104,15 +104,19 @@ bool FuzzyHash::evaluate(Transaction *t, const std::string &str) {
if (fuzzy_hash_buf((const unsigned char*)str.c_str(),
str.size(), result)) {
#ifndef NO_LOGS
t->debug(4, "Problems generating fuzzy hash");
#endif
return false;
}
while (chunk != NULL) {
int i = fuzzy_compare(chunk->data, result);
if (i >= m_threshold) {
#ifndef NO_LOGS
t->debug(4, "Fuzzy hash: matched " \
"with score: " + std::to_string(i) + ".");
#endif
return true;
}
chunk = chunk->next;