From e59bd19fa75e65b794e4c67bdcfb8d13867900f9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 5 May 2015 05:17:25 +1000 Subject: Cleanup: style & const's --- source/blender/bmesh/intern/bmesh_marking.c | 14 +++++++------- source/blender/bmesh/tools/bmesh_triangulate.c | 1 - source/blender/editors/gpencil/gpencil_select.c | 1 - source/blender/editors/object/object_data_transfer.c | 3 --- source/blender/editors/object/object_shapekey.c | 1 - source/blender/editors/screen/area.c | 2 +- source/blender/editors/screen/screen_context.c | 3 +-- source/blender/editors/sculpt_paint/paint_stroke.c | 6 ++---- source/blender/editors/space_sequencer/sequencer_scopes.c | 1 - source/blender/makesdna/DNA_packedFile_types.h | 3 +-- 10 files changed, 12 insertions(+), 23 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index a735f3955fc..93be42ae566 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -73,9 +73,9 @@ static void recount_totsels(BMesh *bm) /** \name BMesh helper functions for selection flushing. * \{ */ -static bool bm_vert_is_edge_select_any_other(BMVert *v, BMEdge *e_first) +static bool bm_vert_is_edge_select_any_other(const BMVert *v, const BMEdge *e_first) { - BMEdge *e_iter = e_first; + const BMEdge *e_iter = e_first; /* start by stepping over the current edge */ while ((e_iter = bmesh_disk_edge_next(e_iter, v)) != e_first) { @@ -87,10 +87,10 @@ static bool bm_vert_is_edge_select_any_other(BMVert *v, BMEdge *e_first) } #if 0 -static bool bm_vert_is_edge_select_any(BMVert *v) +static bool bm_vert_is_edge_select_any(const BMVert *v) { if (v->e) { - BMEdge *e_iter, *e_first; + const BMEdge *e_iter, *e_first; e_iter = e_first = v->e; do { if (BM_elem_flag_test(e_iter, BM_ELEM_SELECT)) { @@ -104,7 +104,7 @@ static bool bm_vert_is_edge_select_any(BMVert *v) static bool bm_edge_is_face_select_any_other(BMLoop *l_first) { - BMLoop *l_iter = l_first; + const BMLoop *l_iter = l_first; /* start by stepping over the current face */ while ((l_iter = l_iter->radial_next) != l_first) { @@ -116,10 +116,10 @@ static bool bm_edge_is_face_select_any_other(BMLoop *l_first) } #if 0 -static bool bm_edge_is_face_select_any(BMEdge *e) +static bool bm_edge_is_face_select_any(const BMEdge *e) { if (e->l) { - BMLoop *l_iter, *l_first; + const BMLoop *l_iter, *l_first; l_iter = l_first = e->l; do { if (BM_elem_flag_test(l_iter->f, BM_ELEM_SELECT)) { diff --git a/source/blender/bmesh/tools/bmesh_triangulate.c b/source/blender/bmesh/tools/bmesh_triangulate.c index 404776a0769..6f2aaf28179 100644 --- a/source/blender/bmesh/tools/bmesh_triangulate.c +++ b/source/blender/bmesh/tools/bmesh_triangulate.c @@ -34,7 +34,6 @@ #include "BLI_utildefines.h" #include "BLI_alloca.h" #include "BLI_memarena.h" -#include "BLI_listbase.h" #include "BLI_heap.h" #include "BLI_edgehash.h" diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 98bce3030a5..9d0cb6d711a 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -40,7 +40,6 @@ #include "BLI_utildefines.h" #include "DNA_gpencil_types.h" -#include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "BKE_context.h" diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index a7802b6a411..b3b2299f77f 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -29,8 +29,6 @@ * \ingroup edobj */ -#include "MEM_guardedalloc.h" - #include "DNA_mesh_types.h" #include "DNA_modifier_types.h" #include "DNA_object_types.h" @@ -59,7 +57,6 @@ #include "ED_object.h" #include "UI_interface.h" -#include "UI_resources.h" #include "object_intern.h" diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index 674eb25942f..8f8bfc47b10 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -48,7 +48,6 @@ #include "DNA_lattice_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" -#include "DNA_scene_types.h" #include "DNA_object_types.h" #include "BKE_context.h" diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index a0ab8de0101..3a4034d9074 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2069,7 +2069,7 @@ void ED_region_info_draw(ARegion *ar, const char *text, int block, float fill_co #define MAX_METADATA_STR 1024 -const char *meta_data_list[] = +static const char *meta_data_list[] = { "File", "Strip", diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 3431ce9f50a..fc4ee47b568 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -81,7 +81,6 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult ScrArea *sa = CTX_wm_area(C); Scene *scene = sc->scene; Base *base; - unsigned int lay = scene->lay; #if 0 /* Using the context breaks adding objects in the UI. Need to find out why - campbell */ Object *obact = CTX_data_active_object(C); @@ -119,7 +118,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult int selectable_objects = CTX_data_equals(member, "selectable_objects"); for (base = scene->base.first; base; base = base->next) { - if (base->lay & lay) { + if (base->lay & scene->lay) { if ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0 && (base->object->restrictflag & OB_RESTRICT_SELECT) == 0) { if (selectable_objects) CTX_data_id_list_add(result, &base->object->id); diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index f0963cae1ce..2ae544706df 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -671,8 +671,7 @@ PaintStroke *paint_stroke_new(bContext *C, get_imapaint_zoom(C, &zoomx, &zoomy); stroke->zoom_2d = max_ff(zoomx, zoomy); - if (stroke->stroke_mode == BRUSH_STROKE_INVERT) - { + if (stroke->stroke_mode == BRUSH_STROKE_INVERT) { if (br->flag & (BRUSH_CURVE)) { RNA_enum_set(op->ptr, "mode", BRUSH_STROKE_NORMAL); } @@ -1137,8 +1136,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event) copy_v2_fl2(mouse, event->mval[0], event->mval[1]); paint_stroke_line_constrain(stroke, mouse); - if (stroke->stroke_started && (first_modal || (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)))) - { + if (stroke->stroke_started && (first_modal || (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)))) { if ((br->mtex.brush_angle_mode & MTEX_ANGLE_RAKE) || (br->mtex.brush_angle_mode & MTEX_ANGLE_RAKE)) { copy_v2_v2(stroke->ups->last_rake, stroke->last_mouse_position); } diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c index 404671cac84..c197aabedfd 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.c +++ b/source/blender/editors/space_sequencer/sequencer_scopes.c @@ -29,7 +29,6 @@ #include #include -#include "BLI_math_color.h" #include "BLI_utildefines.h" #include "IMB_colormanagement.h" diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h index ef0a0f642d6..56140c84cb1 100644 --- a/source/blender/makesdna/DNA_packedFile_types.h +++ b/source/blender/makesdna/DNA_packedFile_types.h @@ -40,8 +40,7 @@ typedef struct PackedFile { void *data; } PackedFile; -enum PF_FileStatus -{ +enum PF_FileStatus { PF_EQUAL = 0, PF_DIFFERS = 1, PF_NOFILE = 2, -- cgit v1.2.3