Commit e48e44113994e39b9f06e02bc6c670e700398b9a

Authored by Brendan Klare
1 parent fc713d2f

Bug fix (forget to assign value to table)

Showing 1 changed file with 1 additions and 2 deletions
openbr/plugins/distance.cpp
@@ -320,8 +320,7 @@ class OnlineDistance : public Distance @@ -320,8 +320,7 @@ class OnlineDistance : public Distance
320 float currentScore = distance->compare(target, query); 320 float currentScore = distance->compare(target, query);
321 321
322 QMutexLocker mutexLocker(&mutex); 322 QMutexLocker mutexLocker(&mutex);
323 - if (!scoreHash.contains(target.file.name)) scoreHash[target.file.name] = 0.0f;  
324 - return (1.0- alpha) * scoreHash[target.file.name] + alpha * currentScore; 323 + return scoreHash[target.file.name] = (1.0- alpha) * scoreHash[target.file.name] + alpha * currentScore;
325 } 324 }
326 }; 325 };
327 326