diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-13 08:28:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-13 08:28:04 +0400 |
commit | 2c4724495494868c88b0a97aaa25b70cb2f88eb2 (patch) | |
tree | 12155289ae2d7d17febcab617ede040ed8f0ecaa /source/blender/windowmanager/intern/wm_keymap.c | |
parent | 2f9b7410dc712961f5684e4892660167c693cda8 (diff) |
code cleanup: use `const char` for args and replace wm_keyconfig_list_find() -> BLI_findstring()
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index f06bae1d084..d5b6d2cd0c8 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -220,23 +220,12 @@ void WM_keyconfig_free(wmKeyConfig *keyconf) MEM_freeN(keyconf); } -static wmKeyConfig *wm_keyconfig_list_find(ListBase *lb, char *idname) -{ - wmKeyConfig *kc; - - for (kc = lb->first; kc; kc = kc->next) - if (0 == strncmp(idname, kc->idname, KMAP_MAX_NAME)) - return kc; - - return NULL; -} - static wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm) { wmKeyConfig *keyconf; /* first try from preset */ - keyconf = wm_keyconfig_list_find(&wm->keyconfigs, U.keyconfigstr); + keyconf = BLI_findstring(&wm->keyconfigs, U.keyconfigstr, offsetof(wmKeyConfig, idname)); if (keyconf) return keyconf; |