More warning fixes

This commit is contained in:
Behdad Esfahbod 2018-01-11 18:19:42 +01:00
parent 680cbc2eb3
commit 9b82aa19d8
1 changed files with 2 additions and 2 deletions

View File

@ -1041,12 +1041,12 @@ struct SortedArrayOf : ArrayOf<Type, LenType>
inline int bsearch (const SearchType &x) const inline int bsearch (const SearchType &x) const
{ {
/* Hand-coded bsearch here since this is in the hot inner loop. */ /* Hand-coded bsearch here since this is in the hot inner loop. */
const Type *array = this->array; const Type *arr = this->array;
int min = 0, max = (int) this->len - 1; int min = 0, max = (int) this->len - 1;
while (min <= max) while (min <= max)
{ {
int mid = (min + max) / 2; int mid = (min + max) / 2;
int c = array[mid].cmp (x); int c = arr[mid].cmp (x);
if (c < 0) if (c < 0)
max = mid - 1; max = mid - 1;
else if (c > 0) else if (c > 0)