diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-05-07 04:15:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-05-07 04:15:32 +0300 |
commit | 1dced6d814dd872620a005dc1a48b47e8a92a6e1 (patch) | |
tree | f0d20ccbf7e3a00f6ab675330c14e5974b21fd83 /source/blender/editors/interface | |
parent | 5cb143cc4c7918c3640f670983ee0249398417fd (diff) |
Cleanup: use eSpace_Type in switch statements
Use eSpace_Type in cases where it's likely newly added spaces
should be handled.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_template_search_menu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_template_search_menu.c b/source/blender/editors/interface/interface_template_search_menu.c index fdf84ba8cb6..122a40a936f 100644 --- a/source/blender/editors/interface/interface_template_search_menu.c +++ b/source/blender/editors/interface/interface_template_search_menu.c @@ -492,7 +492,7 @@ static struct MenuSearch_Data *menu_items_from_ui_create( if (area != NULL) { SpaceLink *sl = area->spacedata.first; - switch (area->spacetype) { + switch ((eSpace_Type)area->spacetype) { SPACE_MENU_MAP(SPACE_VIEW3D, "VIEW3D_MT_editor_menus"); SPACE_MENU_MAP(SPACE_GRAPH, "GRAPH_MT_editor_menus"); SPACE_MENU_MAP(SPACE_OUTLINER, "OUTLINER_MT_editor_menus"); @@ -514,10 +514,10 @@ static struct MenuSearch_Data *menu_items_from_ui_create( (((const SpaceClip *)sl)->mode == SC_MODE_TRACKING) ? "CLIP_MT_tracking_editor_menus" : "CLIP_MT_masking_editor_menus"); - SPACE_MENU_NOP(SPACE_TOPBAR); + SPACE_MENU_NOP(SPACE_EMPTY); + SPACE_MENU_NOP(SPACE_SCRIPT); SPACE_MENU_NOP(SPACE_STATUSBAR); - default: - printf("Unknown space type '%d'\n", area->spacetype); + SPACE_MENU_NOP(SPACE_TOPBAR); } } for (int i = 0; i < idname_array_len; i++) { |