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/makesrna/intern | |
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/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index d0a126cd115..37a9c210832 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -532,7 +532,7 @@ static StructRNA *rna_Space_refine(struct PointerRNA *ptr) { SpaceLink *space = (SpaceLink *)ptr->data; - switch (space->spacetype) { + switch ((eSpace_Type)space->spacetype) { case SPACE_VIEW3D: return &RNA_SpaceView3D; case SPACE_GRAPH: @@ -563,9 +563,16 @@ static StructRNA *rna_Space_refine(struct PointerRNA *ptr) return &RNA_SpacePreferences; case SPACE_CLIP: return &RNA_SpaceClipEditor; - default: - return &RNA_Space; + + /* Currently no type info. */ + case SPACE_SCRIPT: + case SPACE_EMPTY: + case SPACE_TOPBAR: + case SPACE_STATUSBAR: + break; } + + return &RNA_Space; } static ScrArea *rna_area_from_space(PointerRNA *ptr) |