Style Cleanup: whitespace
authorCampbell Barton <ideasman42@gmail.com>
Sun, 12 Jan 2014 11:27:55 +0000 (22:27 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 12 Jan 2014 11:27:55 +0000 (22:27 +1100)
12 files changed:
source/blender/blenkernel/intern/customdata.c
source/blender/bmesh/intern/bmesh_interp.c
source/blender/compositor/nodes/COM_ZCombineNode.cpp
source/blender/editors/render/render_opengl.c
source/blender/editors/sculpt_paint/paint_cursor.c
source/blender/editors/sculpt_paint/paint_image_2d.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_project.c
source/blender/imbuf/intern/rectop.c
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c

index 39b1a9467200225090ad15ff0c1f3c2e560361e5..ccb167ab6a9300e78837d73fefd5b8bb3e0de3b2 100644 (file)
@@ -1474,7 +1474,7 @@ int CustomData_get_active_layer_index(const CustomData *data, int type)
 {
        const int layer_index = data->typemap[type];
        BLI_assert(customdata_typemap_is_valid(data));
-       return (layer_index != -1) ? layer_index + data->layers[layer_index].active: -1;
+       return (layer_index != -1) ? layer_index + data->layers[layer_index].active : -1;
 }
 
 int CustomData_get_render_layer_index(const CustomData *data, int type)
index 70d1d4c81dff8750c2fff09e323106922dcf9a5a..182826b58bf79ddb9b1a4bdfabe1bce2b1471093 100644 (file)
@@ -776,7 +776,7 @@ void BM_data_layer_add(BMesh *bm, CustomData *data, int type)
        CustomData olddata;
 
        olddata = *data;
-       olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers): NULL;
+       olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers) : NULL;
 
        /* the pool is now owned by olddata and must not be shared */
        data->pool = NULL;
@@ -792,7 +792,7 @@ void BM_data_layer_add_named(BMesh *bm, CustomData *data, int type, const char *
        CustomData olddata;
 
        olddata = *data;
-       olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers): NULL;
+       olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers) : NULL;
 
        /* the pool is now owned by olddata and must not be shared */
        data->pool = NULL;
@@ -809,7 +809,7 @@ void BM_data_layer_free(BMesh *bm, CustomData *data, int type)
        bool has_layer;
 
        olddata = *data;
-       olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers): NULL;
+       olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers) : NULL;
 
        /* the pool is now owned by olddata and must not be shared */
        data->pool = NULL;
@@ -828,7 +828,7 @@ void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n)
        bool has_layer;
 
        olddata = *data;
-       olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers): NULL;
+       olddata.layers = (olddata.layers) ? MEM_dupallocN(olddata.layers) : NULL;
 
        /* the pool is now owned by olddata and must not be shared */
        data->pool = NULL;
index b5fe4882f573aee263cabacfbb7b44a46b5db4c1..685c9695eece9849789da92873a24740d90d372a 100644 (file)
@@ -89,7 +89,7 @@ void ZCombineNode::convertToOperations(ExecutionSystem *system, CompositorContex
                addLink(system, maskoperation->getOutputSocket(), antialiasoperation->getInputSocket(0));
 
                // use mask to blend between the input colors.
-               ZCombineMaskOperation *zcombineoperation = this->getbNode()->custom1?new ZCombineMaskAlphaOperation():new ZCombineMaskOperation();
+               ZCombineMaskOperation *zcombineoperation = this->getbNode()->custom1 ? new ZCombineMaskAlphaOperation() : new ZCombineMaskOperation();
                addLink(system, antialiasoperation->getOutputSocket(), zcombineoperation->getInputSocket(0));
                this->getInputSocket(0)->relinkConnections(zcombineoperation->getInputSocket(1), 0, system);
                this->getInputSocket(2)->relinkConnections(zcombineoperation->getInputSocket(2), 2, system);
index a1d09963eb7101e9be3a3bde4ba5d81ce8a0abfc..1fe8f1d475c51d8c02c4a27847aed2ae9f91063f 100644 (file)
@@ -250,7 +250,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
                char err_out[256] = "unknown";
                ImBuf *ibuf_view = ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, oglrender->sizex, oglrender->sizey,
                                                                         IB_rect, OB_SOLID, FALSE, TRUE,
-                                                                        (draw_sky) ? R_ADDSKY: R_ALPHAPREMUL, err_out);
+                                                                        (draw_sky) ? R_ADDSKY : R_ALPHAPREMUL, err_out);
                camera = scene->camera;
 
                if (ibuf_view) {
index 00ae9f7a1c033e0636c98bf2f3c838ed58afdeaa..07993db7ae4b9b6abc7a23b1fcfab72524585239 100644 (file)
@@ -729,7 +729,7 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush,
                                      ViewContext *vc, int x, int y, float zoom, PaintMode mode)
 {
        /* color means that primary brush texture is colured and secondary is used for alpha/mask control */
-       bool col = ELEM3(mode, PAINT_TEXTURE_PROJECTIVE, PAINT_TEXTURE_2D, PAINT_VERTEX) ? true: false;
+       bool col = ELEM3(mode, PAINT_TEXTURE_PROJECTIVE, PAINT_TEXTURE_2D, PAINT_VERTEX) ? true : false;
        OverlayControlFlags flags = BKE_paint_get_overlay_flags();
        /* save lots of GL state
         * TODO: check on whether all of these are needed? */
index b2f429c31a1e7bbfdedd3174dd1e274d28be6684..be2f8727ec4f78eb51e09048f3526f8bd4e83412 100644 (file)
@@ -201,7 +201,7 @@ static unsigned short *brush_painter_mask_new(BrushPainter *painter, int size)
        Brush *brush = painter->brush;
        bool use_masking = painter->cache.use_masking;
 
-       float alpha = (use_masking)? 1.0f: BKE_brush_alpha_get(scene, brush);
+       float alpha = (use_masking) ? 1.0f : BKE_brush_alpha_get(scene, brush);
        int radius = BKE_brush_size_get(scene, brush);
        int xoff = -size * 0.5f + 0.5f;
        int yoff = -size * 0.5f + 0.5f;
@@ -243,7 +243,7 @@ static ImBuf *brush_painter_imbuf_new(BrushPainter *painter, int size)
        bool is_texbrush = painter->cache.is_texbrush;
        bool is_maskbrush = painter->cache.is_maskbrush;
 
-       float alpha = (use_masking)? 1.0f: BKE_brush_alpha_get(scene, brush);
+       float alpha = (use_masking) ? 1.0f : BKE_brush_alpha_get(scene, brush);
        int radius = BKE_brush_size_get(scene, brush);
        int xoff = -size * 0.5f + 0.5f;
        int yoff = -size * 0.5f + 0.5f;
@@ -682,7 +682,7 @@ static void paint_2d_ibuf_rgb_set(ImBuf *ibuf, int x, int y, const short is_toru
 
        if (ibuf->rect_float) {
                float *rrgbf = ibuf->rect_float + (ibuf->x * y + x) * 4;
-               float map_alpha = (rgb[3] == 0.0f)? rrgbf[3] : rrgbf[3] / rgb[3];
+               float map_alpha = (rgb[3] == 0.0f) ? rrgbf[3] : rrgbf[3] / rgb[3];
 
                mul_v3_v3fl(rrgbf, rgb, map_alpha);
        }
index f34eb6a763f43874b6b47d35225747ad9829a880..173e10b480f569e615aef00b4f323df5c3a718cf 100644 (file)
@@ -611,7 +611,7 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char
 
        if (ibuf && ibuf->rect) {
                const bool use_clip = (U.glalphaclip != 1.0f);
-               int zoomfilter = (U.gameflags & USER_DISABLE_MIPMAP )? GL_NEAREST : GL_LINEAR;
+               int zoomfilter = (U.gameflags & USER_DISABLE_MIPMAP ) ? GL_NEAREST : GL_LINEAR;
                /* Setup GL params */
                glEnable(GL_BLEND);
                glBlendFunc(GL_SRC_ALPHA,  GL_ONE_MINUS_SRC_ALPHA);
index 3b4405a2c1c315076064ef5a7d1d06f5d3659990..b4bc202c177359a5209f6271271e444dde120432 100644 (file)
@@ -884,7 +884,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
                                        ot = ot_weight_paste;
                                        WM_operator_properties_create_ptr(&op_ptr, ot);
                                        RNA_int_set(&op_ptr, "weight_group", i);
-                                       icon = (locked) ? ICON_BLANK1:ICON_PASTEDOWN;
+                                       icon = (locked) ? ICON_BLANK1 : ICON_PASTEDOWN;
                                        uiItemFullO_ptr(row, ot, "", icon, op_ptr.data, WM_OP_INVOKE_DEFAULT, 0);
 
                                        /* The weight entry delete function */
@@ -892,7 +892,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
                                        ot = ot_weight_delete;
                                        WM_operator_properties_create_ptr(&op_ptr, ot);
                                        RNA_int_set(&op_ptr, "weight_group", i);
-                                       icon = (locked) ? ICON_LOCKED:ICON_X;
+                                       icon = (locked) ? ICON_LOCKED : ICON_X;
                                        uiItemFullO_ptr(row, ot, "", icon, op_ptr.data, WM_OP_INVOKE_DEFAULT, 0);
 
                                        yco -= UI_UNIT_Y;
index 28ffdea0e6cf20c8931cb2dbcf7dd8dd71c65b1f..0954563be14de77f9fbb245d58b0b07203144f85 100644 (file)
@@ -141,7 +141,7 @@ static eV3DProjStatus ed_view3d_project__internal(const ARegion *ar,
 
        if (((flag & V3D_PROJ_TEST_CLIP_ZERO) == 0) || (fabsf(vec4[3]) > (float)BL_ZERO_CLIP)) {
                if (((flag & V3D_PROJ_TEST_CLIP_NEAR) == 0)  || (vec4[3] > (float)BL_NEAR_CLIP)) {
-                       const float scalar = (vec4[3] != 0.0f) ? (1.0f / vec4[3]): 0.0f;
+                       const float scalar = (vec4[3] != 0.0f) ? (1.0f / vec4[3]) : 0.0f;
                        const float fx = ((float)ar->winx / 2.0f) * (1.0f + (vec4[0] * scalar));
                        if (((flag & V3D_PROJ_TEST_CLIP_WIN) == 0) || (fx > 0.0f && fx < (float)ar->winx)) {
                                const float fy = ((float)ar->winy / 2.0f) * (1.0f + (vec4[1] * scalar));
index 16268b19b1a240a293b9a182777a72608408c8c9..6df7587ee5c3af2c4d1980edd6ff4dc1813d4b0d 100644 (file)
@@ -321,7 +321,7 @@ void IMB_rectblend(ImBuf *dbuf, ImBuf *obuf, ImBuf *sbuf, unsigned short *dmask,
                                drf = drectf;
                                srf = srectf;
                                for (x = width; x > 0; x--, drf += 4, srf += 4) {
-                                       float map_alpha = (srf[3] == 0.0f)? drf[3] : drf[3] / srf[3];
+                                       float map_alpha = (srf[3] == 0.0f) ? drf[3] : drf[3] / srf[3];
 
                                        drf[0] = srf[0] * map_alpha;
                                        drf[1] = srf[1] * map_alpha;
index 6a25b97f4cdcf6d28ea7570054017969974e5232..160de41e5262e4587b18b1a7ac104d9e6ec5cd9c 100644 (file)
@@ -1833,7 +1833,7 @@ static void rna_def_struct_function_prototype_cpp(FILE *f, StructRNA *UNUSED(srn
                if (flag & PROP_DYNAMIC)
                        ptrstr = pout ? "**" : "*";
                else if (type == PROP_POINTER)
-                       ptrstr = pout ? "*": "";
+                       ptrstr = pout ? "*" : "";
                else if (dp->prop->arraydimension)
                        ptrstr = "*";
                else if (type == PROP_STRING && (flag & PROP_THICK_WRAP))
index efda3f3f78cbca69862c4d621dca4c3e38be9f4d..4f75364e8bb053dab85f2ae152b5752486b74e88 100644 (file)
@@ -6378,8 +6378,8 @@ bool RNA_property_equals(PointerRNA *a, PointerRNA *b, PropertyRNA *prop, eRNAEq
                                int *array_a, *array_b;
                                bool equals;
 
-                               array_a = (len > 16) ? MEM_callocN(sizeof(int) * len, "RNA equals"): fixed_a;
-                               array_b = (len > 16) ? MEM_callocN(sizeof(int) * len, "RNA equals"): fixed_b;
+                               array_a = (len > 16) ? MEM_callocN(sizeof(int) * len, "RNA equals") : fixed_a;
+                               array_b = (len > 16) ? MEM_callocN(sizeof(int) * len, "RNA equals") : fixed_b;
 
                                RNA_property_int_get_array(a, prop, array_a);
                                RNA_property_int_get_array(b, prop, array_b);