提交 9b82aa19 编写于 作者: B Behdad Esfahbod

More warning fixes

上级 680cbc2e
...@@ -1041,12 +1041,12 @@ struct SortedArrayOf : ArrayOf<Type, LenType> ...@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册