style cleanup: odd indentation

This commit is contained in:
Campbell Barton
2013-03-14 05:52:30 +00:00
parent 5f92078d53
commit aff410b558
6 changed files with 29 additions and 20 deletions

View 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)
# -----------------------------------------------------------------------------

View 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);

View 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;

View 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;
}

View 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;
}

View 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++) {