summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/xkbcommon/src/keysym-utf.c
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-03-24 16:10:15 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-03-24 16:10:15 +0100
commit3b5c0bc0780f1749fed7c07bd8b691400a0282b7 (patch)
tree1022f5553ad5a0aca9b5f3b49ca38a01c2329d20 /src/3rdparty/xkbcommon/src/keysym-utf.c
parentc79918733a194ebbe5a2fe1617c884659f3e4b9f (diff)
parent21f1738a94fc8544ece04b3b1ee03a11986fe59b (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
Diffstat (limited to 'src/3rdparty/xkbcommon/src/keysym-utf.c')
-rw-r--r--src/3rdparty/xkbcommon/src/keysym-utf.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/3rdparty/xkbcommon/src/keysym-utf.c b/src/3rdparty/xkbcommon/src/keysym-utf.c
index 5484a8311d..129da15cf8 100644
--- a/src/3rdparty/xkbcommon/src/keysym-utf.c
+++ b/src/3rdparty/xkbcommon/src/keysym-utf.c
@@ -838,20 +838,19 @@ static const struct codepair keysymtab[] = {
static uint32_t
bin_search(const struct codepair *table, size_t length, xkb_keysym_t keysym)
{
- int min = 0;
- int max = length;
- int mid;
+ int first = 0;
+ int last = length;
if (keysym < table[0].keysym || keysym > table[length].keysym)
return 0;
/* binary search in table */
- while (max >= min) {
- mid = (min + max) / 2;
+ while (last >= first) {
+ int mid = (first + last) / 2;
if (table[mid].keysym < keysym)
- min = mid + 1;
+ first = mid + 1;
else if (table[mid].keysym > keysym)
- max = mid - 1;
+ last = mid - 1;
else /* found it */
return table[mid].ucs;
}