From a372638a76e05aaa44589845680c15a7f09a7f1e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Aug 2017 09:06:34 +1000 Subject: Cleanup: use static vars where appropriate --- source/blender/editors/animation/keyframes_general.c | 1 + source/blender/editors/gpencil/editaction_gpencil.c | 2 +- source/blender/editors/gpencil/gpencil_edit.c | 2 +- source/blender/editors/sculpt_paint/paint_ops.c | 4 +--- source/blender/editors/space_clip/space_clip.c | 2 +- source/blender/editors/space_sequencer/space_sequencer.c | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index c1e82583521..071c5fab9d7 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -52,6 +52,7 @@ #include "BKE_deform.h" #include "RNA_access.h" +#include "RNA_enum_types.h" #include "ED_anim_api.h" #include "ED_keyframing.h" diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index bd4856f1b93..9227f9b1097 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -314,7 +314,7 @@ void ED_gplayer_frames_keytype_set(bGPDlayer *gpl, short type) */ /* globals for copy/paste data (like for other copy/paste buffers) */ -ListBase gp_anim_copybuf = {NULL, NULL}; +static ListBase gp_anim_copybuf = {NULL, NULL}; static int gp_anim_copy_firstframe = 999999999; static int gp_anim_copy_lastframe = -999999999; static int gp_anim_copy_cfra = 0; diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index fc6df49cf6c..55a3fc09f2e 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -343,7 +343,7 @@ ListBase gp_strokes_copypastebuf = {NULL, NULL}; * This is needed to prevent dangling and unsafe pointers when pasting across datablocks, * or after a color used by a stroke in the buffer gets deleted (via user action or undo). */ -GHash *gp_strokes_copypastebuf_colors = NULL; +static GHash *gp_strokes_copypastebuf_colors = NULL; /* Free copy/paste buffer data */ void ED_gpencil_strokes_copybuf_free(void) diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index f88b64129e7..123a70d5044 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -821,8 +821,6 @@ static int brush_uv_sculpt_tool_set_exec(bContext *C, wmOperator *op) static void BRUSH_OT_uv_sculpt_tool_set(wmOperatorType *ot) { - /* from rna_scene.c */ - extern EnumPropertyItem uv_sculpt_tool_items[]; /* identifiers */ ot->name = "UV Sculpt Tool Set"; ot->description = "Set the UV sculpt tool"; @@ -836,7 +834,7 @@ static void BRUSH_OT_uv_sculpt_tool_set(wmOperatorType *ot) ot->flag = 0; /* props */ - ot->prop = RNA_def_enum(ot->srna, "tool", uv_sculpt_tool_items, 0, "Tool", ""); + ot->prop = RNA_def_enum(ot->srna, "tool", rna_enum_uv_sculpt_tool_items, 0, "Tool", ""); } /***** Stencil Control *****/ diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 237082f948b..597b8be89b2 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -821,7 +821,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf) #endif } -const char *clip_context_dir[] = {"edit_movieclip", "edit_mask", NULL}; +static const char *clip_context_dir[] = {"edit_movieclip", "edit_mask", NULL}; static int clip_context(const bContext *C, const char *member, bContextDataResult *result) { diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index a2a80297041..f965c1af54a 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -435,7 +435,7 @@ static void sequencer_dropboxes(void) /* ************* end drop *********** */ -const char *sequencer_context_dir[] = {"edit_mask", NULL}; +static const char *sequencer_context_dir[] = {"edit_mask", NULL}; static int sequencer_context(const bContext *C, const char *member, bContextDataResult *result) { -- cgit v1.2.3