From aff410b558c4c438f38a4050dbe13684e209572b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 14 Mar 2013 05:52:30 +0000 Subject: style cleanup: odd indentation --- build_files/cmake/clang_array_check.py | 2 +- source/blender/blenkernel/BKE_text.h | 12 ++++----- source/blender/blenkernel/intern/text.c | 2 +- source/blender/editors/sculpt_paint/paint_stroke.c | 29 ++++++++++++++-------- source/blender/editors/sculpt_paint/paint_vertex.c | 2 +- source/blender/editors/space_text/text_ops.c | 2 +- 6 files changed, 29 insertions(+), 20 deletions(-) diff --git a/build_files/cmake/clang_array_check.py b/build_files/cmake/clang_array_check.py index 3070c27f769..fc85b5c454d 100644 --- a/build_files/cmake/clang_array_check.py +++ b/build_files/cmake/clang_array_check.py @@ -115,7 +115,7 @@ args = sys.argv[2:] # print(args) tu = index.parse(sys.argv[1], args) -print('Translation unit: %s' % tu.spelling) +# print('Translation unit: %s' % tu.spelling) # ----------------------------------------------------------------------------- diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h index 466adc9477e..5e81fb85d76 100644 --- a/source/blender/blenkernel/BKE_text.h +++ b/source/blender/blenkernel/BKE_text.h @@ -45,16 +45,16 @@ struct SpaceText; void BKE_text_free (struct Text *text); void txt_set_undostate (int u); int txt_get_undostate (void); -struct Text* BKE_text_add (struct Main *bmain, const char *name); +struct Text *BKE_text_add (struct Main *bmain, const char *name); int txt_extended_ascii_as_utf8(char **str); int BKE_text_reload (struct Text *text); -struct Text* BKE_text_load (struct Main *bmain, const char *file, const char *relpath); -struct Text* BKE_text_copy (struct Text *ta); +struct Text *BKE_text_load (struct Main *bmain, const char *file, const char *relpath); +struct Text *BKE_text_copy (struct Text *ta); void BKE_text_unlink (struct Main *bmain, struct Text *text); void BKE_text_clear (struct Text *text); void BKE_text_write (struct Text *text, const char *str); -char* txt_to_buf (struct Text *text); +char *txt_to_buf (struct Text *text); void txt_clean_text (struct Text *text); void txt_order_cursors (struct Text *text); int txt_find_string (struct Text *text, const char *findstr, int wrap, int match_case); @@ -82,7 +82,7 @@ void txt_delete_word (struct Text *text); void txt_delete_selected (struct Text *text); void txt_sel_all (struct Text *text); void txt_sel_line (struct Text *text); -char* txt_sel_to_buf (struct Text *text); +char *txt_sel_to_buf (struct Text *text); void txt_insert_buf (struct Text *text, const char *in_buffer); void txt_print_undo (struct Text *text); void txt_undo_add_op (struct Text *text, int op); @@ -100,7 +100,7 @@ void txt_indent (struct Text *text); void txt_uncomment (struct Text *text); void txt_move_lines (struct Text *text, const int direction); void txt_duplicate_line (struct Text *text); -int setcurr_tab_spaces (struct Text *text, int space); +int txt_setcurr_tab_spaces(struct Text *text, int space); /* utility functions, could be moved somewhere more generic but are python/text related */ int text_check_bracket(const char ch); diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index e229c288a24..3936c533a41 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -2861,7 +2861,7 @@ void txt_move_lines(struct Text *text, const int direction) } } -int setcurr_tab_spaces(Text *text, int space) +int txt_setcurr_tab_spaces(Text *text, int space) { int i = 0; int test = 0; diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 98e068ac8d4..03067d1bdd4 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -317,8 +317,7 @@ static int paint_smooth_stroke(PaintStroke *stroke, float output[2], output[0] = sample->mouse[0]; output[1] = sample->mouse[1]; - if (paint_supports_smooth_stroke(stroke->brush, mode)) - { + if (paint_supports_smooth_stroke(stroke->brush, mode)) { float u = stroke->brush->smooth_stroke_factor, v = 1.0f - u; float dx = stroke->last_mouse_position[0] - sample->mouse[0]; float dy = stroke->last_mouse_position[1] - sample->mouse[1]; @@ -463,11 +462,17 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode) switch (mode) { case PAINT_SCULPT: - if (ELEM4(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SNAKE_HOOK)) - return false; + if (ELEM4(br->sculpt_tool, + SCULPT_TOOL_GRAB, + SCULPT_TOOL_THUMB, + SCULPT_TOOL_ROTATE, + SCULPT_TOOL_SNAKE_HOOK)) + { + return false; + } default: ; - } + } return true; } @@ -476,19 +481,23 @@ bool paint_supports_smooth_stroke(Brush *br, PaintMode mode) if(!(br->flag & BRUSH_SMOOTH_STROKE) || (br->flag & BRUSH_ANCHORED) || (br->flag & BRUSH_RESTORE_MESH)) + { return false; + } switch (mode) { case PAINT_SCULPT: if (ELEM4(br->sculpt_tool, - SCULPT_TOOL_GRAB, - SCULPT_TOOL_THUMB, - SCULPT_TOOL_ROTATE, - SCULPT_TOOL_SNAKE_HOOK)) + SCULPT_TOOL_GRAB, + SCULPT_TOOL_THUMB, + SCULPT_TOOL_ROTATE, + SCULPT_TOOL_SNAKE_HOOK)) + { return false; + } default: ; - } + } return true; } diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 0722bb8e072..8f1d241dd9f 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -881,7 +881,7 @@ static float calc_vp_strength_col_dl(VPaint *vp, ViewContext *vc, const float co return BKE_brush_curve_strength_clamp(brush, dist, brush_size_pressure); } } - if(rgba) + if (rgba) zero_v4(rgba); return 0.0f; } diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 7918b19fbbf..cdbb3e7c600 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -1011,7 +1011,7 @@ static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op)) text_drawcache_tag_update(st, 0); // double check tabs/spaces before splitting the line - curts = setcurr_tab_spaces(text, space); + curts = txt_setcurr_tab_spaces(text, space); txt_split_curline(text); for (a = 0; a < curts; a++) { -- cgit v1.2.3