diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-12-03 14:38:13 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-12-03 14:39:40 +0300 |
commit | 59e4a56d87a026fee008f152dff85ec62198c7a9 (patch) | |
tree | 9a5d219e7a828c06cf70455ecebdf594009a142f /source/blender/windowmanager/intern/wm_keymap.c | |
parent | 2c7a70395c7ab283014d64b7551838e7741776a5 (diff) |
Cleanup: change `WM_key_event_operator_id` to `WM_key_event_operator` and make it return kmi pointer directly.
All three usages of this func were only using kmi_id to find again kmi itself, pretty dumb!
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index fe32fd6fcdb..6c451525742 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -1298,17 +1298,12 @@ char *WM_key_event_operator_string( return NULL; } -int WM_key_event_operator_id( +wmKeyMapItem *WM_key_event_operator( const bContext *C, const char *opname, int opcontext, IDProperty *properties, const bool is_hotkey, wmKeyMap **r_keymap) { - wmKeyMapItem *kmi = wm_keymap_item_find(C, opname, opcontext, properties, is_hotkey, true, r_keymap); - - if (kmi) - return kmi->id; - else - return 0; + return wm_keymap_item_find(C, opname, opcontext, properties, is_hotkey, true, r_keymap); } int WM_keymap_item_compare(wmKeyMapItem *k1, wmKeyMapItem *k2) |