From 4e09fd76bcabb602f1bd31c2bbd5dd2b09e4b64a Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Fri, 5 Nov 2021 14:56:22 +0100 Subject: Cleanup (UI): Add/use type for operator context enum Adds a `wmOperatorCallContext` typedef for the existing `WM_OP_XXX` operator context enum. This adds type safety, allows the compiler to produce better warnings and helps understanding what a variable is for. Differential Revision: https://developer.blender.org/D13113 Reviewed by: Campbell Barton --- source/blender/windowmanager/WM_keymap.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/windowmanager/WM_keymap.h') diff --git a/source/blender/windowmanager/WM_keymap.h b/source/blender/windowmanager/WM_keymap.h index 564afe084b9..0633ffe55ea 100644 --- a/source/blender/windowmanager/WM_keymap.h +++ b/source/blender/windowmanager/WM_keymap.h @@ -26,6 +26,7 @@ /* dna-savable wmStructs here */ #include "BLI_utildefines.h" #include "DNA_windowmanager_types.h" +#include "WM_types.h" #ifdef __cplusplus extern "C" { @@ -169,14 +170,14 @@ int WM_keymap_item_raw_to_string(const short shift, const int result_len); wmKeyMapItem *WM_key_event_operator(const struct bContext *C, const char *opname, - int opcontext, + wmOperatorCallContext opcontext, struct IDProperty *properties, const short include_mask, const short exclude_mask, struct wmKeyMap **r_keymap); char *WM_key_event_operator_string(const struct bContext *C, const char *opname, - int opcontext, + wmOperatorCallContext opcontext, struct IDProperty *properties, const bool is_strict, char *result, -- cgit v1.2.3