Changeset 4d86e06 for keymap.c


Ignore:
Timestamp:
Jul 23, 2009, 12:53:57 AM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
ba6c8bd
Parents:
029a8b5
Message:
Get rid of a whole bunch of useless casts.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • keymap.c

    rd43edd2 r4d86e06  
    4444   */
    4545  for (i = owl_list_get_size(&km->bindings)-1; i>=0; i--) {
    46     curkb = (owl_keybinding*)owl_list_get_element(&km->bindings, i);
     46    curkb = owl_list_get_element(&km->bindings, i);
    4747    if (owl_keybinding_equal(curkb, kb)) {
    4848      owl_list_remove_element(&km->bindings, i);
     
    152152{
    153153  owl_keymap *km;
    154   km = (owl_keymap*)owl_malloc(sizeof(owl_keymap));
     154  km = owl_malloc(sizeof(owl_keymap));
    155155  if (!km) return NULL;
    156156  owl_keymap_init(km, name, desc, default_fn, prealways_fn, postalways_fn);
     
    169169owl_keymap *owl_keyhandler_get_keymap(owl_keyhandler *kh, char *mapname)
    170170{
    171   return (owl_keymap*)owl_dict_find_element(&kh->keymaps, mapname);
     171  return owl_dict_find_element(&kh->keymaps, mapname);
    172172}
    173173
     
    191191  owl_keymap *km;
    192192  if (kh->active && !strcmp(mapname, kh->active->name)) return(kh->active);
    193   km = (owl_keymap*)owl_dict_find_element(&kh->keymaps, mapname);
     193  km = owl_dict_find_element(&kh->keymaps, mapname);
    194194  if (!km) return(NULL);
    195195  owl_keyhandler_reset(kh);
     
    240240  for (km=kh->active; km; km=km->submap) {
    241241    for (i=owl_list_get_size(&km->bindings)-1; i>=0; i--) {
    242       kb = (owl_keybinding*)owl_list_get_element(&km->bindings, i);
     242      kb = owl_list_get_element(&km->bindings, i);
    243243      match = owl_keybinding_match(kb, kh);
    244244      if (match == 1) {         /* subset match */
Note: See TracChangeset for help on using the changeset viewer.