diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-04 13:53:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-04 14:21:10 +0300 |
commit | 3be5859b21950ed5f5949fce803cf8cbe68dcf99 (patch) | |
tree | d17c63c3db09b6e6c6e4574e3b24de51172172a2 /source/blender/windowmanager/intern/wm_keymap_utils.c | |
parent | dff51d418a6499a9e90adc97ab2bb599de36a860 (diff) |
Cleanup: pass keymap items as const where possible
Diffstat (limited to 'source/blender/windowmanager/intern/wm_keymap_utils.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_keymap_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap_utils.c b/source/blender/windowmanager/intern/wm_keymap_utils.c index 953fb9fed79..865889e7e64 100644 --- a/source/blender/windowmanager/intern/wm_keymap_utils.c +++ b/source/blender/windowmanager/intern/wm_keymap_utils.c @@ -477,7 +477,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) return km; } -static bool wm_keymap_item_uses_modifier(wmKeyMapItem *kmi, const int event_modifier) +static bool wm_keymap_item_uses_modifier(const wmKeyMapItem *kmi, const int event_modifier) { if (kmi->ctrl != KM_ANY) { if ((kmi->ctrl == KM_NOTHING) != ((event_modifier & KM_CTRL) == 0)) { @@ -505,9 +505,9 @@ static bool wm_keymap_item_uses_modifier(wmKeyMapItem *kmi, const int event_modi return true; } -bool WM_keymap_uses_event_modifier(wmKeyMap *keymap, const int event_modifier) +bool WM_keymap_uses_event_modifier(const wmKeyMap *keymap, const int event_modifier) { - LISTBASE_FOREACH (wmKeyMapItem *, kmi, &keymap->items) { + LISTBASE_FOREACH (const wmKeyMapItem *, kmi, &keymap->items) { if ((kmi->flag & KMI_INACTIVE) == 0) { if (wm_keymap_item_uses_modifier(kmi, event_modifier)) { return true; |