Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-19 05:42:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-19 05:46:32 +0300
commit48ad55a03d658e73ae90166e752f5cf81292c8c1 (patch)
tree768f4b6ec43abb64c62586fd034194d17a477eea /source/blender/editors/space_buttons/space_buttons.c
parentd731ee4960cf78f7b461be0c8f5ef27c098da265 (diff)
Cleanup: use enum for CTX_data_mode_enum
Exposes errors in some cases when compared against incompatible values.
Diffstat (limited to 'source/blender/editors/space_buttons/space_buttons.c')
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index acba11ddec7..609ef86b003 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -201,7 +201,7 @@ static void buttons_main_region_layout_properties(const bContext *C, SpaceProper
static void buttons_main_region_layout_tool(const bContext *C, ARegion *ar)
{
const WorkSpace *workspace = CTX_wm_workspace(C);
- const int mode = CTX_data_mode_enum(C);
+ const enum eContextObjectMode mode = CTX_data_mode_enum(C);
const char *contexts_base[5] = {NULL};
contexts_base[0] = ".active_tool";
@@ -260,6 +260,8 @@ static void buttons_main_region_layout_tool(const bContext *C, ARegion *ar)
case CTX_MODE_WEIGHT_GPENCIL:
ARRAY_SET_ITEMS(contexts, ".greasepencil_weight");
break;
+ default:
+ break;
}
}
else if (workspace->tools_space_type == SPACE_IMAGE) {
@@ -295,6 +297,8 @@ static void buttons_main_region_layout_tool(const bContext *C, ARegion *ar)
case CTX_MODE_EDIT_GPENCIL:
ARRAY_SET_ITEMS(contexts, ".greasepencil_edit");
break;
+ default:
+ break;
}
int i = 0;