From afe9970d48f7ac4000df80f35b4de2722636d79a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 16 Mar 2013 14:42:05 +0000 Subject: style cleanup --- source/blender/editors/sculpt_paint/paint_stroke.c | 12 ++++++------ source/blender/editors/space_clip/clip_ops.c | 2 +- source/blender/editors/space_text/text_format_osl.c | 8 ++++---- source/blender/editors/space_view3d/view3d_draw.c | 5 +++-- 4 files changed, 14 insertions(+), 13 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 66df3a8be33..8c5552f48bc 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -147,7 +147,7 @@ static float event_tablet_data(const wmEvent *event, int *pen_flip) /* Initialize the stroke cache variants from operator properties */ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode, struct PaintStroke *stroke, - const float mouse[2], float pressure) + const float mouse[2], float pressure) { Scene *scene = CTX_data_scene(C); UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; @@ -289,7 +289,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const wmEve /* XXX: meh, this is round about because * BKE_brush_jitter_pos isn't written in the best way to * be reused here */ - if(factor != 1.0f) { + if (factor != 1.0f) { sub_v2_v2v2(delta, mouse_out, mouse_in); mul_v2_fl(delta, factor); add_v2_v2v2(mouse_out, mouse_in, delta); @@ -324,7 +324,7 @@ static int paint_smooth_stroke(PaintStroke *stroke, float output[2], output[1] = sample->mouse[1]; if (paint_supports_smooth_stroke(stroke->brush, mode)) { - float radius = stroke->brush->smooth_stroke_radius*stroke->zoom_2d; + float radius = stroke->brush->smooth_stroke_radius * stroke->zoom_2d; 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]; @@ -483,9 +483,9 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode) bool paint_supports_smooth_stroke(Brush *br, PaintMode mode) { - if(!(br->flag & BRUSH_SMOOTH_STROKE) || - (br->flag & BRUSH_ANCHORED) || - (br->flag & BRUSH_RESTORE_MESH)) + if (!(br->flag & BRUSH_SMOOTH_STROKE) || + (br->flag & BRUSH_ANCHORED) || + (br->flag & BRUSH_RESTORE_MESH)) { return false; } diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index a38673daeb9..914eb9526a8 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -1134,7 +1134,7 @@ static void *do_proxy_thread(void *data_v) static void do_sequence_proxy(void *pjv, int *build_sizes, int build_count, int *build_undistort_sizes, int build_undistort_count, - short *stop, short *do_update, float *progress) + short *stop, short *do_update, float *progress) { ProxyJob *pj = pjv; MovieClip *clip = pj->clip; diff --git a/source/blender/editors/space_text/text_format_osl.c b/source/blender/editors/space_text/text_format_osl.c index 59bbd82a569..c95929a720f 100644 --- a/source/blender/editors/space_text/text_format_osl.c +++ b/source/blender/editors/space_text/text_format_osl.c @@ -141,10 +141,10 @@ static int txtfmt_osl_find_specialvar(const char *string) int i, len; /* OSL shader types */ - if (STR_LITERAL_STARTSWITH(string, "shader", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "surface", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "volume", len)) i = len; - else if (STR_LITERAL_STARTSWITH(string, "displacement", len)) i = len; + if (STR_LITERAL_STARTSWITH(string, "shader", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "surface", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "volume", len)) i = len; + else if (STR_LITERAL_STARTSWITH(string, "displacement", len)) i = len; else i = 0; /* If next source char is an identifier (eg. 'i' in "definate") no match */ diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 252a27947fb..18e5aaf2964 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1357,8 +1357,9 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) char error[256]; if (rv3d->gpuoffscreen) { - if (GPU_offscreen_width(rv3d->gpuoffscreen) != w || - GPU_offscreen_height(rv3d->gpuoffscreen) != h) { + if (GPU_offscreen_width(rv3d->gpuoffscreen) != w || + GPU_offscreen_height(rv3d->gpuoffscreen) != h) + { GPU_offscreen_free(rv3d->gpuoffscreen); rv3d->gpuoffscreen = NULL; } -- cgit v1.2.3