diff options
author | Ran Benita <ran234@gmail.com> | 2014-02-08 15:30:05 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2014-02-08 15:30:05 +0200 |
commit | 769b91c580832eea279770d8a14f8aa23bf16f34 (patch) | |
tree | ce640c57d3baef2d4aa80631496cde8832ff0ec9 /src/xkbcomp/keymap.c | |
parent | 50b73ec0e7d8d592bd56fe0da7c012414acf2748 (diff) | |
download | libxkbcommon-769b91c580832eea279770d8a14f8aa23bf16f34.tar.gz libxkbcommon-769b91c580832eea279770d8a14f8aa23bf16f34.tar.bz2 libxkbcommon-769b91c580832eea279770d8a14f8aa23bf16f34.zip |
Use (1u << idx) instead of (1 << idx) where appropriate
It doesn't matter (I think), since the implicit conversion doesn't have
any effect (e.g. sign-extension). But it's better to be aware of the
type.
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/xkbcomp/keymap.c')
-rw-r--r-- | src/xkbcomp/keymap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c index aee631f..8a70577 100644 --- a/src/xkbcomp/keymap.c +++ b/src/xkbcomp/keymap.c @@ -39,7 +39,7 @@ ComputeEffectiveMask(struct xkb_keymap *keymap, struct xkb_mods *mods) mods->mask = mods->mods & MOD_REAL_MASK_ALL; darray_enumerate(i, mod, keymap->mods) - if (mods->mods & (1 << i)) + if (mods->mods & (1u << i)) mods->mask |= mod->mapping; } @@ -158,7 +158,7 @@ ApplyInterpsToKey(struct xkb_keymap *keymap, struct xkb_key *key) if ((group == 0 && level == 0) || !interp->level_one_only) if (interp->virtual_mod != XKB_MOD_INVALID) - vmodmap |= (1 << interp->virtual_mod); + vmodmap |= (1u << interp->virtual_mod); if (interp->action.type != ACTION_TYPE_NONE) key->groups[group].levels[level].action = interp->action; @@ -194,7 +194,7 @@ UpdateDerivedKeymapFields(struct xkb_keymap *keymap) /* Update keymap->mods, the virtual -> real mod mapping. */ xkb_foreach_key(key, keymap) darray_enumerate(i, mod, keymap->mods) - if (key->vmodmap & (1 << i)) + if (key->vmodmap & (1u << i)) mod->mapping |= key->modmap; /* Now update the level masks for all the types to reflect the vmods. */ |