style cleanup: odd indentation
authorCampbell Barton <ideasman42@gmail.com>
Thu, 14 Mar 2013 05:52:30 +0000 (05:52 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 14 Mar 2013 05:52:30 +0000 (05:52 +0000)
build_files/cmake/clang_array_check.py
source/blender/blenkernel/BKE_text.h
source/blender/blenkernel/intern/text.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/space_text/text_ops.c

index 3070c27f769675b3dabcaa3c48921ff61db3b6ac..fc85b5c454d63f8e0285aa51d1f3cdb4ebb1f3bf 100644 (file)
@@ -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)
 
 # -----------------------------------------------------------------------------
 
index 466adc9477ee95af55af0e5a4ab530091cc6dcd4..5e81fb85d7607c34834c986db1052803f51c9696 100644 (file)
@@ -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);
index e229c288a244525c4c2996579d5eef45abac2cc6..3936c533a41474bfb0009128791892142721c648 100644 (file)
@@ -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;
index 98e068ac8d436ff571d88051e1e2180bf4c1b5a4..03067d1bdd4b95645b8ce2da0afde29169e5b618 100644 (file)
@@ -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;
 }
 
index 0722bb8e07232b91ecdf93ca766954abf82962ba..8f1d241dd9f5cb3102c086e89a7d95a64fa08aeb 100644 (file)
@@ -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;
 }
index 7918b19fbbf54beea6a0e185418df856d1026f50..cdbb3e7c600fc61b37f6dcebeefd0951f716c07a 100644 (file)
@@ -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++) {