From 348622360752916f9b776597e846cd2af260cdb9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 17 Apr 2012 05:09:37 +0000 Subject: code cleanup: remove/comment some unused code. --- source/blender/blenfont/intern/blf_font.c | 4 ++-- source/blender/bmesh/operators/bmo_mirror.c | 6 +++--- source/blender/editors/mesh/editmesh_bvh.c | 13 ------------- source/blender/editors/mesh/editmesh_tools.c | 4 ++-- source/blender/editors/sound/sound_ops.c | 3 +-- 5 files changed, 8 insertions(+), 22 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 84cefc923a0..7a4e1d4b781 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -279,8 +279,8 @@ void blf_font_buffer(FontBLF *font, const char *str) if (font->b_fbuf) { int yb = yb_start; - for (y = (chy >= 0 ? 0:-chy); y < height_clip; y++) { - for (x = (chx >= 0 ? 0:-chx); x < width_clip; x++) { + for (y = ((chy >= 0) ? 0 : -chy); y < height_clip; y++) { + for (x = ((chx >= 0) ? 0 : -chx); x < width_clip; x++) { a = *(g->bitmap + x + (yb * g->pitch)) / 255.0f; if (a > 0.0f) { diff --git a/source/blender/bmesh/operators/bmo_mirror.c b/source/blender/bmesh/operators/bmo_mirror.c index 1b6d64073c0..17a00f5e095 100644 --- a/source/blender/bmesh/operators/bmo_mirror.c +++ b/source/blender/bmesh/operators/bmo_mirror.c @@ -43,7 +43,7 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op) BMOperator dupeop, weldop; BMOIter siter; BMIter iter; - BMVert *v, *v2, **vmap = NULL; + BMVert *v /* , *v2 */ /* UNUSED */, **vmap = NULL; BLI_array_declare(vmap); BMEdge /* *e, */ **emap = NULL; BLI_array_declare(emap); @@ -69,11 +69,11 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op) /* create old -> new mappin */ i = 0; - v2 = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL); + /* v2 = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL); */ /* UNUSED */ BMO_ITER(v, &siter, bm, &dupeop, "newout", BM_VERT) { BLI_array_growone(vmap); vmap[i] = v; - v2 = BM_iter_step(&iter); + /* v2 = BM_iter_step(&iter); */ /* UNUSED */ i++; } bm->elem_index_dirty |= BM_VERT; diff --git a/source/blender/editors/mesh/editmesh_bvh.c b/source/blender/editors/mesh/editmesh_bvh.c index f9c673010f3..c1b694d5e2d 100644 --- a/source/blender/editors/mesh/editmesh_bvh.c +++ b/source/blender/editors/mesh/editmesh_bvh.c @@ -305,19 +305,6 @@ BMVert *BMBVH_FindClosestVert(BMBVHTree *tree, float *co, float maxdist) return NULL; } -typedef struct walklist { - BMVert *v; - int valence; - int depth; - float w, r; - int totwalked; - - /* state data */ - BMVert *lastv; - BMLoop *curl, *firstl; - BMEdge *cure; -} walklist; - /* UNUSED */ #if 0 static short winding(float *v1, float *v2, float *v3) diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index b8ab538b60e..2af931372bb 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2051,8 +2051,8 @@ void MESH_OT_remove_doubles(wmOperatorType *ot) /************************ Vertex Path Operator *************************/ typedef struct PathNode { - int u; - int visited; + /* int u; */ /* UNUSED */ + /* int visited; */ /* UNUSED */ ListBase edges; } PathNode; diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index f7598045f81..b50c3f11534 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -283,8 +283,7 @@ static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op)) sound_update_animation_flags_exec(C, NULL); - for (cfra = scene->r.sfra > 0 ? scene->r.sfra - 1 : 0; cfra <= scene->r.efra + 1; cfra++) - { + for (cfra = (scene->r.sfra > 0) ? (scene->r.sfra - 1) : 0; cfra <= scene->r.efra + 1; cfra++) { scene->r.cfra = cfra; scene_update_for_newframe(bmain, scene, scene->lay); } -- cgit v1.2.3