Combine a couple of macros

Easier to see what it does without the trivial macros.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-08-10 22:48:18 +03:00
parent 4c34bda15a
commit ec2172f31b
1 changed files with 2 additions and 14 deletions

View File

@ -417,24 +417,12 @@ XkbKeyNumSyms(struct xkb_key *key, xkb_group_index_t group,
return key->num_syms[group * key->width + level];
}
static inline xkb_keysym_t *
XkbKeySym(struct xkb_key *key, int ndx)
{
return &darray_item(key->syms, ndx);
}
static inline int
XkbKeySymOffset(struct xkb_key *key, xkb_group_index_t group,
xkb_level_index_t level)
{
return key->sym_index[group * key->width + level];
}
static inline xkb_keysym_t *
XkbKeySymEntry(struct xkb_key *key, xkb_group_index_t group,
xkb_level_index_t level)
{
return XkbKeySym(key, XkbKeySymOffset(key, group, level));
return &darray_item(key->syms,
key->sym_index[group * key->width + level]);
}
static inline union xkb_action *