Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Thu, 5 May 2016 20:29:39 +0000 (06:29 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 5 May 2016 20:34:25 +0000 (06:34 +1000)
source/blender/blenlib/intern/math_base_inline.c
source/blender/blenlib/intern/math_color_inline.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editcurve_paint.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/sculpt_paint/paint_image_proj.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/transform/transform_snap_object.c
source/blender/imbuf/intern/imageprocess.c
source/blender/nodes/shader/nodes/node_shader_tex_environment.c
source/blender/nodes/shader/nodes/node_shader_texture.c

index fcd35de..8d2d80c 100644 (file)
@@ -352,7 +352,7 @@ MALWAYS_INLINE __m128 _bli_math_improve_5throot_solution(
        __m128 approx4 = _mm_mul_ps(approx2, approx2);
        __m128 t = _mm_div_ps(x, approx4);
        __m128 summ = _mm_add_ps(_mm_mul_ps(_mm_set1_ps(4.0f), old_result), t); /* fma */
-       return _mm_mul_ps(summ, _mm_set1_ps(1.0f/5.0f));
+       return _mm_mul_ps(summ, _mm_set1_ps(1.0f / 5.0f));
 }
 
 /* Calculate powf(x, 2.4). Working domain: 1e-10 < x < 1e+10 */
index c268481..180d621 100644 (file)
 MALWAYS_INLINE __m128 srgb_to_linearrgb_v4_simd(const __m128 c)
 {
        __m128 cmp = _mm_cmplt_ps(c, _mm_set1_ps(0.04045f));
-       __m128 lt = _mm_max_ps(_mm_mul_ps(c, _mm_set1_ps(1.0f/12.92f)),
+       __m128 lt = _mm_max_ps(_mm_mul_ps(c, _mm_set1_ps(1.0f / 12.92f)),
                               _mm_set1_ps(0.0f));
        __m128 gtebase = _mm_mul_ps(_mm_add_ps(c, _mm_set1_ps(0.055f)),
-                                   _mm_set1_ps(1.0f/1.055f)); /* fma */
+                                   _mm_set1_ps(1.0f / 1.055f)); /* fma */
        __m128 gte = _bli_math_fastpow24(gtebase);
        return _bli_math_blend_sse(cmp, lt, gte);
 }
index 91927fb..18fdcb5 100644 (file)
@@ -5824,9 +5824,9 @@ static int curve_dissolve_exec(bContext *C, wmOperator *UNUSED(op))
 
                                                for (int axis = 0; axis < dims; axis++) {
                                                        BKE_curve_forward_diff_bezier(
-                                                                       bezt_a->vec[1][axis], bezt_a->vec[2][axis],
-                                                                       bezt_b->vec[0][axis], bezt_b->vec[1][axis],
-                                                                       points_stride + axis, points_stride_len, dims * sizeof(float));
+                                                               bezt_a->vec[1][axis], bezt_a->vec[2][axis],
+                                                               bezt_b->vec[0][axis], bezt_b->vec[1][axis],
+                                                               points_stride + axis, points_stride_len, dims * sizeof(float));
                                                }
 
                                                points_stride += dims * points_stride_len;
index 014592e..9986dd1 100644 (file)
@@ -485,7 +485,7 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), ARegion *UNUS
                                selem->location_local[2] - location_prev[2]);
                        location_prev = selem->location_local;
                        const float radius = stroke_elem_radius(cdd, selem);
-                       gluSphere(qobj, radius , 12, 8);
+                       gluSphere(qobj, radius, 12, 8);
 
                        location_prev = selem->location_local;
                }
index cddd779..2bca549 100644 (file)
@@ -3393,7 +3393,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
 #ifdef WITH_INPUT_IME
                    &&
                    !is_ime_composing &&
-                       (!WM_event_is_ime_switch(event) || !BLT_lang_is_ime_supported())
+                   (!WM_event_is_ime_switch(event) || !BLT_lang_is_ime_supported())
 #endif
                    )
                {
index 3df6750..d273f83 100644 (file)
@@ -5866,7 +5866,7 @@ static int add_simple_uvs_exec(bContext *C, wmOperator *UNUSED(op))
        ED_mesh_uv_texture_ensure(me, NULL);
 
        BM_mesh_bm_from_me(
-               bm, me,(&(struct BMeshFromMeshParams){
+               bm, me, (&(struct BMeshFromMeshParams){
                    .calc_face_normal = true,
                }));
        /* select all uv loops first - pack parameters needs this to make sure charts are registered */
index 9d1cf65..09594ab 100644 (file)
@@ -423,8 +423,8 @@ static int ui_compatible_sockets(int typeA, int typeB)
 
 static int ui_node_item_name_compare(const void *a, const void *b)
 {
-       const bNodeType* type_a = *(const bNodeType**)a;
-       const bNodeType* type_b = *(const bNodeType**)b;
+       const bNodeType *type_a = *(const bNodeType **)a;
+       const bNodeType *type_b = *(const bNodeType **)b;
        return BLI_natstrcmp(type_a->ui_name, type_b->ui_name);
 }
 
@@ -462,7 +462,7 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
        }
        NODE_TYPES_END
 
-       qsort(sorted_ntypes, BLI_array_count(sorted_ntypes), sizeof(bNodeType*), ui_node_item_name_compare);
+       qsort(sorted_ntypes, BLI_array_count(sorted_ntypes), sizeof(bNodeType *), ui_node_item_name_compare);
 
        /* generate UI */
        for (int j = 0; j < BLI_array_count(sorted_ntypes); j++) {
index 1b1c2c9..ea34895 100644 (file)
@@ -958,8 +958,9 @@ static bool snapEditMesh(
                                hit.dist = local_depth;
 
                                if (treedata->tree &&
-                                       BLI_bvhtree_ray_cast(treedata->tree, ray_start_local, ray_normal_local, 0.0f,
-                                               &hit, treedata->raycast_callback, treedata) != -1)
+                                   BLI_bvhtree_ray_cast(
+                                       treedata->tree, ray_start_local, ray_normal_local, 0.0f,
+                                       &hit, treedata->raycast_callback, treedata) != -1)
                                {
                                        hit.dist += len_diff;
                                        hit.dist /= local_scale;
@@ -989,9 +990,9 @@ static bool snapEditMesh(
                                nearest.index = -1;
                                nearest.dist_sq = local_depth * local_depth;
                                if (treedata->tree &&
-                                       BLI_bvhtree_find_nearest_to_ray(
-                                               treedata->tree, ray_start_local, ray_normal_local,
-                                               &nearest, NULL, NULL) != -1)
+                                   BLI_bvhtree_find_nearest_to_ray(
+                                           treedata->tree, ray_start_local, ray_normal_local,
+                                           &nearest, NULL, NULL) != -1)
                                {
                                        const BMVert *v = BM_vert_at_index(em->bm, nearest.index);
                                        retval = snapVertex(
@@ -1009,8 +1010,8 @@ static bool snapEditMesh(
                                        BMEdge *eed = BM_edge_at_index(em->bm, i);
 
                                        if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) &&
-                                               !BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) &&
-                                               !BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))
+                                           !BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) &&
+                                           !BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))
                                        {
                                                short v1no[3], v2no[3];
                                                normal_float_to_short_v3(v1no, eed->v1->no);
index 7088819..0f5fd65 100644 (file)
@@ -390,7 +390,7 @@ static void processor_apply_scanline_func(TaskPool * __restrict pool,
                                           void *taskdata,
                                           int UNUSED(threadid))
 {
-       ScanlineGlobalData *data = (ScanlineGlobalData*)BLI_task_pool_userdata(pool);
+       ScanlineGlobalData *data = BLI_task_pool_userdata(pool);
        int start_scanline = GET_INT_FROM_POINTER(taskdata);
        int num_scanlines = min_ii(data->scanlines_per_task,
                                   data->total_scanlines - start_scanline);
index 292221c..2f8f95b 100644 (file)
@@ -82,7 +82,7 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat, bNode *node, bNodeE
                
        ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL);
        if (ibuf && (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) == 0 &&
-               GPU_material_do_color_management(mat))
+           GPU_material_do_color_management(mat))
        {
                GPU_link(mat, "srgb_to_linearrgb", out[0].link, &out[0].link);
        }
index 2ce38a0..6edf6c2 100644 (file)
@@ -127,7 +127,7 @@ static int gpu_shader_texture(GPUMaterial *mat, bNode *node, bNodeExecData *UNUS
 
                ImBuf *ibuf = BKE_image_acquire_ibuf(tex->ima, &tex->iuser, NULL);
                if (ibuf && (ibuf->colormanage_flag & IMB_COLORMANAGE_IS_DATA) == 0 &&
-                       GPU_material_do_color_management(mat))
+                   GPU_material_do_color_management(mat))
                {
                        GPU_link(mat, "srgb_to_linearrgb", out[1].link, &out[1].link);
                }