diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-25 20:35:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-25 20:35:57 +0400 |
commit | ed684977006c072d826127a253495b1d02f6f6e7 (patch) | |
tree | 9d7cc1d3553706945d30c6ebce2bef2f3cbcdac3 | |
parent | 8df319f5e67c19fce61d38d838bfe19f71dd413f (diff) |
style cleanup
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_base_inline.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 12 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 16 | ||||
-rw-r--r-- | source/blender/imbuf/intern/rectop.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 2 |
8 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 879ba6651c2..b1563363e2a 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -748,11 +748,11 @@ RigidBodyWorld *BKE_rigidbody_world_copy(RigidBodyWorld *rbw) void BKE_rigidbody_world_groups_relink(RigidBodyWorld *rbw) { if (rbw->group && rbw->group->id.newid) - rbw->group = (Group*)rbw->group->id.newid; + rbw->group = (Group *)rbw->group->id.newid; if (rbw->constraints && rbw->constraints->id.newid) - rbw->constraints = (Group*)rbw->constraints->id.newid; + rbw->constraints = (Group *)rbw->constraints->id.newid; if (rbw->effector_weights->group && rbw->effector_weights->group->id.newid) - rbw->effector_weights->group = (Group*)rbw->effector_weights->group->id.newid; + rbw->effector_weights->group = (Group *)rbw->effector_weights->group->id.newid; } /* Add rigid body settings to the specified object */ diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index d140dfa6a2d..c7a8c96a232 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -177,7 +177,7 @@ Scene *BKE_scene_copy(Scene *sce, int type) scen->stats = NULL; scen->fps_info = NULL; - if(sce->rigidbody_world) + if (sce->rigidbody_world) scen->rigidbody_world = BKE_rigidbody_world_copy(sce->rigidbody_world); BLI_duplicatelist(&(scen->markers), &(sce->markers)); diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index 61af5b5079a..f916460dec4 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -149,7 +149,7 @@ MINLINE int power_of_2_min_i(int n) * with integers, to avoid gradual darkening when rounding down */ MINLINE int divide_round_i(int a, int b) { - return (2*a + b)/(2*b); + return (2 * a + b) / (2 * b); } MINLINE unsigned int highest_order_bit_i(unsigned int n) diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 66e749011c3..6b45c6f1cb3 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -620,22 +620,22 @@ void BLI_file_free_lines(LinkNode *lines) bool BLI_file_older(const char *file1, const char *file2) { #ifdef WIN32 - #ifndef __MINGW32__ +#ifndef __MINGW32__ struct _stat st1, st2; - #else +#else struct _stati64 st1, st2; - #endif +#endif UTF16_ENCODE(file1); UTF16_ENCODE(file2); - #ifndef __MINGW32__ +#ifndef __MINGW32__ if (_wstat(file1_16, &st1)) return false; if (_wstat(file2_16, &st2)) return false; - #else +#else if (_wstati64(file1_16, &st1)) return false; if (_wstati64(file2_16, &st2)) return false; - #endif +#endif UTF16_UN_ENCODE(file2); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 2e96ffe8c21..da09edd1076 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1648,7 +1648,7 @@ static void single_object_users(Main *bmain, Scene *scene, View3D *v3d, int flag groupn = BKE_group_copy(group); for (go = groupn->gobject.first; go; go = go->next) - go->ob = (Object*)go->ob->id.newid; + go->ob = (Object *)go->ob->id.newid; } } } diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index f245ec474f3..b755dbaa91e 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -703,9 +703,9 @@ BLI_INLINE unsigned int mcol_mul(unsigned int col1, unsigned int col2, int fac) cp = (unsigned char *)&col; /* first mul, then blend the fac */ - cp[0] = divide_round_i(mfac * cp1[0] * 255 + fac * cp2[0] * cp1[0], 255*255); - cp[1] = divide_round_i(mfac * cp1[1] * 255 + fac * cp2[1] * cp1[1], 255*255); - cp[2] = divide_round_i(mfac * cp1[2] * 255 + fac * cp2[2] * cp1[2], 255*255); + cp[0] = divide_round_i(mfac * cp1[0] * 255 + fac * cp2[0] * cp1[0], 255 * 255); + cp[1] = divide_round_i(mfac * cp1[1] * 255 + fac * cp2[1] * cp1[1], 255 * 255); + cp[2] = divide_round_i(mfac * cp1[2] * 255 + fac * cp2[2] * cp1[2], 255 * 255); cp[3] = 255; return col; @@ -2780,9 +2780,9 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const fl /* to keep tracked of modified loops for shared vertex color blending */ if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) { - vpd->mlooptag = MEM_mallocN(sizeof(bool)*me->totloop, "VPaintData mlooptag"); + vpd->mlooptag = MEM_mallocN(sizeof(bool) * me->totloop, "VPaintData mlooptag"); if (vpd->use_fast_update) - vpd->mfacetag = MEM_mallocN(sizeof(bool)*me->totface*4, "VPaintData mfacetag"); + vpd->mfacetag = MEM_mallocN(sizeof(bool) * me->totface * 4, "VPaintData mfacetag"); } /* for filtering */ @@ -2958,10 +2958,10 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P swap_m4m4(vc->rv3d->persmat, mat); /* clear modified tag for blur tool */ - if(vpd->mlooptag) - memset(vpd->mlooptag, 0, sizeof(bool)*me->totloop); + if (vpd->mlooptag) + memset(vpd->mlooptag, 0, sizeof(bool) * me->totloop); if (vpd->mfacetag) - memset(vpd->mfacetag, 0, sizeof(bool)*me->totface*4); + memset(vpd->mfacetag, 0, sizeof(bool) * me->totface * 4); for (index = 0; index < totindex; index++) { if (indexar[index] && indexar[index] <= me->totpoly) { diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index d9375e3919b..0277a2648dd 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -66,9 +66,9 @@ static void blend_color_add(char cp[3], const char cp1[3], const char cp2[3], co temp = cp1[0] + divide_round_i(fac * cp2[0], 255); if (temp > 254) cp[0] = 255; else cp[0] = temp; - temp = cp1[1] + divide_round_i(fac * cp2[1] , 255); + temp = cp1[1] + divide_round_i(fac * cp2[1], 255); if (temp > 254) cp[1] = 255; else cp[1] = temp; - temp = cp1[2] + divide_round_i(fac * cp2[2] , 255); + temp = cp1[2] + divide_round_i(fac * cp2[2], 255); if (temp > 254) cp[2] = 255; else cp[2] = temp; } @@ -89,9 +89,9 @@ static void blend_color_mul(char cp[3], const char cp1[3], const char cp2[3], co int mfac = 255 - fac; /* first mul, then blend the fac */ - cp[0] = divide_round_i((mfac * cp1[0] * 255) + (fac * cp1[0] * cp2[0]), 255*255); - cp[1] = divide_round_i((mfac * cp1[1] * 255) + (fac * cp1[1] * cp2[1]), 255*255); - cp[2] = divide_round_i((mfac * cp1[2] * 255) + (fac * cp1[2] * cp2[2]), 255*255); + cp[0] = divide_round_i((mfac * cp1[0] * 255) + (fac * cp1[0] * cp2[0]), 255 * 255); + cp[1] = divide_round_i((mfac * cp1[1] * 255) + (fac * cp1[1] * cp2[1]), 255 * 255); + cp[2] = divide_round_i((mfac * cp1[2] * 255) + (fac * cp1[2] * cp2[2]), 255 * 255); } static void blend_color_lighten(char cp[3], const char cp1[3], const char cp2[3], const int fac) diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index e3c7af7b487..c7cbd8d0ac6 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -2003,7 +2003,7 @@ static void rna_def_struct_function_call_impl_cpp(FILE *f, StructRNA *srna, Func if (dp->prop->type == PROP_POINTER) if ((dp->prop->flag & PROP_RNAPTR) && !(dp->prop->flag & PROP_THICK_WRAP)) fprintf(f, "(::%s *) &%s.ptr", rna_parameter_type_name(dp->prop), rna_safe_id(dp->prop->identifier)); - else if(dp->prop->flag & PROP_OUTPUT) + else if (dp->prop->flag & PROP_OUTPUT) fprintf(f, "(::%s **) &%s->ptr.data", rna_parameter_type_name(dp->prop), rna_safe_id(dp->prop->identifier)); else fprintf(f, "(::%s *) %s.ptr.data", rna_parameter_type_name(dp->prop), rna_safe_id(dp->prop->identifier)); |