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:
@@ -1064,7 +1064,7 @@ int WM_operator_smooth_viewtx_get(const wmOperator *op)
|
||||
}
|
||||
|
||||
/* invoke callback, uses enum property named "type" */
|
||||
int WM_menu_invoke_ex(bContext *C, wmOperator *op, int opcontext)
|
||||
int WM_menu_invoke_ex(bContext *C, wmOperator *op, wmOperatorCallContext opcontext)
|
||||
{
|
||||
PropertyRNA *prop = op->type->prop;
|
||||
|
||||
@@ -1216,7 +1216,7 @@ int WM_operator_confirm_message_ex(bContext *C,
|
||||
const char *title,
|
||||
const int icon,
|
||||
const char *message,
|
||||
const short opcontext)
|
||||
const wmOperatorCallContext opcontext)
|
||||
{
|
||||
IDProperty *properties = op->ptr->data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user