Simplify switch logic for validator

This commit is contained in:
Lorenz Meier 2016-12-21 08:10:08 +01:00
parent 6f78ef4084
commit 9618adb542
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ DataValidatorGroup::get_best(uint64_t timestamp, int *index)
if ((((max_confidence < MIN_REGULAR_CONFIDENCE) && (confidence >= MIN_REGULAR_CONFIDENCE)) ||
(confidence > max_confidence && (next->priority() >= max_priority)) ||
(fabsf(confidence - max_confidence) < 0.01f && (next->priority() > max_priority))
) && (confidence > FLT_EPSILON)) {
) && (confidence > 0.0f)) {
max_index = i;
max_confidence = confidence;
max_priority = next->priority();