Refactor: use enum types for event modifiers & types

Use enum types for event modifier and types,
`wmEventModifierFlag` & `wmEventType` respectively.

This helps with readability and avoids unintended mixing with other
types. To quiet GCC's `-Wswitch` warnings many `default` cases needed
to be added to switch statements on event types.

Ref !136759
This commit is contained in:
Campbell Barton
2025-03-31 23:48:29 +00:00
parent 60f480f21f
commit bcdcc3dbde
49 changed files with 238 additions and 36 deletions

View File

@@ -255,6 +255,9 @@ static wmOperatorStatus snode_bg_viewmove_modal(bContext *C, wmOperator *op, con
op->customdata = nullptr;
return OPERATOR_CANCELLED;
default: {
break;
}
}
return OPERATOR_RUNNING_MODAL;
@@ -687,6 +690,9 @@ static wmOperatorStatus sample_modal(bContext *C, wmOperator *op, const wmEvent
case MOUSEMOVE:
sample_apply(C, op, event);
break;
default: {
break;
}
}
return OPERATOR_RUNNING_MODAL;