Bugfix (assignment used over comparison)
This commit is contained in:
parent
686fd07e08
commit
c5e034c3ac
1 changed files with 2 additions and 2 deletions
|
@ -56,8 +56,8 @@ User UserTable::find(int c) const
|
||||||
while (low < high && ! found) {
|
while (low < high && ! found) {
|
||||||
mid = (low + high) / 2;
|
mid = (low + high) / 2;
|
||||||
//
|
//
|
||||||
int midnbr = users[mid].getCardNbr();
|
const int midnbr = users[mid].getCardNbr();
|
||||||
if (midnbr = c) {
|
if (c == midnbr) {
|
||||||
found = true;
|
found = true;
|
||||||
} else if (users[mid].getCardNbr() < c) {
|
} else if (users[mid].getCardNbr() < c) {
|
||||||
low = mid + 1;
|
low = mid + 1;
|
||||||
|
|
Loading…
Reference in a new issue