-
Notifications
You must be signed in to change notification settings - Fork 57
Description
EDCC-Palmprint-Recognition/src/core/comparer.cpp
Lines 18 to 24 in c908758
| while (lhs_md_cur_ptr < lhs_md_end_ptr) { | |
| uint8_t distance = *(uint8_t*)lhs_md_cur_ptr ^ *(uint8_t*)rhs_md_cur_ptr; | |
| if (distance == 0x00) { // same d, s. | |
| acc += 2; | |
| } else if (distance < 0x10) { // same d, diff s. | |
| acc += 0; | |
| } |
Based on the matching stage's math definition
When the variable acc variable should be increased by 1.
In addition, if the variable distance should yield a specific value of 0x10. It is not recommended to use a comparison expression for this simple operation; instead, an equality expression should be used.