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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user