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
This commit is contained in:
Julian Eisel
2021-11-05 14:56:22 +01:00
parent 35198606d5
commit 4e09fd76bc
27 changed files with 105 additions and 87 deletions

View File

@@ -1741,7 +1741,7 @@ static void template_search_add_button_name(uiBlock *block,
static void template_search_add_button_operator(uiBlock *block,
const char *const operator_name,
const int opcontext,
const wmOperatorCallContext opcontext,
const int icon,
const bool editable)
{