diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-25 06:41:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-25 06:41:30 +0400 |
commit | e1a54214bbed9b32e1aee0e849ae654c495afa80 (patch) | |
tree | a95eaa2b98e7baa7e91fa34db46571e531b1cfb3 /source/blender/editors | |
parent | 153eea5f23e2f0060d89a701ddd9b48085fc6070 (diff) |
code cleanup:
- remove unused defines.
- quiet some shadow warnings.
- bevel, ifdef out some asserts that are too common.
- style
Diffstat (limited to 'source/blender/editors')
4 files changed, 13 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 90a2c8037c4..9bc232c6a61 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -793,7 +793,7 @@ void *paint_2d_new_stroke(bContext *C, wmOperator *op) return s; } -void paint_2d_redraw (const bContext *C, void *ps, int final) +void paint_2d_redraw(const bContext *C, void *ps, int final) { ImagePaintState *s = ps; diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 859d8d76f15..d7e2d010f03 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -179,7 +179,7 @@ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode, SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE))) { if (((brush->mtex.brush_map_mode == MTEX_MAP_MODE_VIEW) || - (brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)) && + (brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)) && !(brush->flag & BRUSH_RAKE)) { if (brush->flag & BRUSH_RANDOM_ROTATION) @@ -191,7 +191,8 @@ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode, if ((brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)) { ups->tex_mouse[0] = BLI_frand() * stroke->vc.ar->sizex; ups->tex_mouse[1] = BLI_frand() * stroke->vc.ar->sizey;; - } else { + } + else { copy_v2_v2(ups->tex_mouse, mouse); } } diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index ba931b05214..e3270d9ce8e 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1460,23 +1460,22 @@ static int file_delete_poll(bContext *C) { int poll = ED_operator_file_active(C); SpaceFile *sfile = CTX_wm_space_file(C); - struct direntry *file; - if (sfile && sfile->params) { + if (sfile && sfile->params) { char dir[FILE_MAX], group[FILE_MAX]; int numfiles = filelist_numfiles(sfile->files); int i; int num_selected = 0; if (filelist_islibrary(sfile->files, dir, group)) poll = 0; - for (i = 0; i < numfiles; i++) { + for (i = 0; i < numfiles; i++) { if (filelist_is_selected(sfile->files, i, CHECK_FILES)) { num_selected++; } } if (num_selected <= 0) { poll = 0; - } + } } else poll = 0; diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 4c56a016176..8f8c5b8e03c 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -754,7 +754,8 @@ static void stitch_set_face_preview_buffer_position(BMFace *efa, StitchPreviewer /* setup face preview for all coincident uvs and their faces */ static void stitch_setup_face_preview_for_uv_group(UvElement *element, StitchState *state, IslandStitchData *island_stitch_data, - PreviewPosition *preview_position) { + PreviewPosition *preview_position) +{ StitchPreviewer *preview = state->stitch_preview; /* static island does not change so returning immediately */ @@ -774,7 +775,8 @@ static void stitch_setup_face_preview_for_uv_group(UvElement *element, StitchSta /* checks if uvs are indeed stitchable and registers so that they can be shown in preview */ static void stitch_validate_uv_stichability(UvElement *element, StitchState *state, IslandStitchData *island_stitch_data, - PreviewPosition *preview_position) { + PreviewPosition *preview_position) +{ UvElement *element_iter; StitchPreviewer *preview = state->stitch_preview; int vert_index; @@ -809,7 +811,8 @@ static void stitch_validate_uv_stichability(UvElement *element, StitchState *sta static void stitch_validate_edge_stichability(UvEdge *edge, StitchState *state, IslandStitchData *island_stitch_data, - PreviewPosition *preview_position) { + PreviewPosition *preview_position) +{ UvEdge *edge_iter = edge->first; StitchPreviewer *preview = state->stitch_preview; |