Cleanup: add trailing commas to structs
authorCampbell Barton <ideasman42@gmail.com>
Sun, 6 Jan 2019 13:58:10 +0000 (00:58 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 6 Jan 2019 22:15:07 +0000 (09:15 +1100)
12 files changed:
source/blender/blenkernel/intern/object.c
source/blender/editors/interface/interface_region_hud.c
source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
source/blender/editors/render/render_update.c
source/blender/editors/space_node/node_gizmo.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_gizmo_camera.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform_gizmo_extrude_3d.c
source/blender/gpu/GPU_framebuffer.h
source/blender/python/bmesh/bmesh_py_types.c
source/blender/windowmanager/message_bus/wm_message_bus.h

index 14fafc1..42b187e 100644 (file)
@@ -1239,7 +1239,8 @@ Object **BKE_object_pose_array_get_ex(ViewLayer *view_layer, View3D *v3d, uint *
                objects = BKE_view_layer_array_from_objects_in_mode(
                        view_layer, v3d, r_objects_len, {
                            .object_mode = OB_MODE_POSE,
-                           .no_dup_data = unique});
+                           .no_dup_data = unique,
+                       });
        }
        else if (ob_pose != NULL) {
                *r_objects_len = 1;
@@ -1281,7 +1282,8 @@ Base **BKE_object_pose_base_array_get_ex(ViewLayer *view_layer, View3D *v3d, uin
                bases = BKE_view_layer_array_from_bases_in_mode(
                        view_layer, v3d, r_bases_len, {
                            .object_mode = OB_MODE_POSE,
-                           .no_dup_data = unique});
+                           .no_dup_data = unique,
+                       });
        }
        else if (base_pose != NULL) {
                *r_bases_len = 1;
index c30958a..cc87b82 100644 (file)
@@ -213,7 +213,7 @@ static void hud_region_draw(const bContext *C, ARegion *ar)
        GPU_clear(GPU_COLOR_BIT);
 
        if ((ar->flag & RGN_FLAG_HIDDEN) == 0) {
-               ui_draw_menu_back(NULL, NULL, &(rcti){.xmax = ar->winx, .ymax = ar->winy});
+               ui_draw_menu_back(NULL, NULL, &(rcti){ .xmax = ar->winx, .ymax = ar->winy, });
                ED_region_panels_draw(C, ar);
        }
 }
@@ -337,7 +337,7 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa)
        ED_region_tag_redraw(ar);
 
        /* Reset zoom level (not well supported). */
-       ar->v2d.cur = ar->v2d.tot = (rctf){.xmax = ar->winx, .ymax = ar->winy};
+       ar->v2d.cur = ar->v2d.tot = (rctf){ .xmax = ar->winx, .ymax = ar->winy, };
        ar->v2d.minzoom = 1.0f;
        ar->v2d.maxzoom = 1.0f;
 
@@ -352,7 +352,7 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa)
                if (was_hidden) {
                        ar->winx = ar->v2d.winx;
                        ar->winy = ar->v2d.winy;
-                       ar->v2d.cur = ar->v2d.tot = (rctf){.xmax = ar->winx, .ymax = ar->winy};
+                       ar->v2d.cur = ar->v2d.tot = (rctf){ .xmax = ar->winx, .ymax = ar->winy, };
                }
                CTX_wm_region_set((bContext *)C, ar_prev);
        }
index dd5f97c..4ff999b 100644 (file)
@@ -458,7 +458,7 @@ static void gizmo_mesh_spin_init_message_subscribe(
        WM_msg_subscribe_rna_params(
                mbus,
                &(const wmMsgParams_RNA){
-                   .ptr = (PointerRNA){.type = gzgroup->type->srna},
+                   .ptr = (PointerRNA){ .type = gzgroup->type->srna, },
                    .prop = ggd->data.gzgt_axis_prop,
                },
                &msg_sub_value_gz_tag_refresh, __func__);
index c42eda6..47d8eff 100644 (file)
@@ -150,7 +150,7 @@ void ED_render_scene_update(const DEGEditorUpdateContext *update_ctx, int update
                                                            .view_layer = view_layer,
                                                            .ar = ar,
                                                            .v3d = (View3D *)sa->spacedata.first,
-                                                           .engine_type = engine_type
+                                                           .engine_type = engine_type,
                                                        }));
                                        }
                                }
index 3039621..bf3af43 100644 (file)
@@ -293,7 +293,7 @@ static void gizmo_node_crop_prop_matrix_set(
        const bool ny = rct.ymin > rct.ymax;
        BLI_rctf_resize(&rct, fabsf(matrix[0][0]), fabsf(matrix[1][1]));
        BLI_rctf_recenter(&rct, (matrix[3][0] / dims[0]) + 0.5f, (matrix[3][1] / dims[1]) + 0.5f);
-       BLI_rctf_isect(&(rctf){.xmin = 0, .ymin = 0, .xmax = 1, .ymax = 1}, &rct, &rct);
+       BLI_rctf_isect(&(rctf){ .xmin = 0, .ymin = 0, .xmax = 1, .ymax = 1, }, &rct, &rct);
        if (nx) {
                SWAP(float, rct.xmin, rct.xmax);
        }
index 4ac2121..0586f11 100644 (file)
@@ -2659,12 +2659,13 @@ static void view3d_from_minmax(
                        C, v3d, ar, smooth_viewtx,
                        &(const V3D_SmoothParams) {
                            .camera_old = v3d->camera, .ofs = new_ofs,
-                           .dist = ok_dist ? &new_dist : NULL});
+                           .dist = ok_dist ? &new_dist : NULL,
+                       });
        }
        else {
                ED_view3d_smooth_view(
                        C, v3d, ar, smooth_viewtx,
-                       &(const V3D_SmoothParams) {.ofs = new_ofs, .dist = ok_dist ? &new_dist : NULL});
+                       &(const V3D_SmoothParams) { .ofs = new_ofs, .dist = ok_dist ? &new_dist : NULL, });
        }
 
        /* smooth view does viewlock RV3D_BOXVIEW copy */
@@ -3497,7 +3498,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
 
        ED_view3d_smooth_view(
                C, v3d, ar, smooth_viewtx,
-               &(const V3D_SmoothParams) {.ofs = new_ofs, .dist = &new_dist});
+               &(const V3D_SmoothParams) { .ofs = new_ofs, .dist = &new_dist, });
 
        if (rv3d->viewlock & RV3D_BOXVIEW) {
                view3d_boxview_sync(CTX_wm_area(C), ar);
@@ -3642,7 +3643,7 @@ static void axis_set_view(
                /* to camera */
                ED_view3d_smooth_view(
                        C, v3d, ar, smooth_viewtx,
-                       &(const V3D_SmoothParams) {.camera_old = v3d->camera, .ofs = rv3d->ofs, .quat = quat});
+                       &(const V3D_SmoothParams) { .camera_old = v3d->camera, .ofs = rv3d->ofs, .quat = quat, });
        }
        else if (orig_persp == RV3D_CAMOB && v3d->camera) {
                /* from camera */
@@ -3657,7 +3658,7 @@ static void axis_set_view(
 
                ED_view3d_smooth_view(
                        C, v3d, ar, smooth_viewtx,
-                       &(const V3D_SmoothParams) {.ofs = ofs, .quat = quat, .dist = &dist});
+                       &(const V3D_SmoothParams) { .ofs = ofs, .quat = quat, .dist = &dist, });
        }
        else {
                /* rotate around selection */
@@ -3674,7 +3675,7 @@ static void axis_set_view(
                /* no camera involved */
                ED_view3d_smooth_view(
                        C, v3d, ar, smooth_viewtx,
-                       &(const V3D_SmoothParams) {.quat = quat, .dyn_ofs = dyn_ofs_pt});
+                       &(const V3D_SmoothParams) { .quat = quat, .dyn_ofs = dyn_ofs_pt, });
        }
 }
 
@@ -3872,7 +3873,8 @@ static int view_camera_exec(bContext *C, wmOperator *op)
                                C, v3d, ar, smooth_viewtx,
                                &(const V3D_SmoothParams) {
                                    .camera = v3d->camera, .ofs = rv3d->ofs, .quat = rv3d->viewquat,
-                                   .dist = &rv3d->dist, .lens = &v3d->lens});
+                                   .dist = &rv3d->dist, .lens = &v3d->lens,
+                               });
                }
                else {
                        /* return to settings of last view */
@@ -3998,7 +4000,7 @@ static int vieworbit_exec(bContext *C, wmOperator *op)
 
                        ED_view3d_smooth_view(
                                C, v3d, ar, smooth_viewtx,
-                               &(const V3D_SmoothParams) {.quat = quat_new, .dyn_ofs = dyn_ofs_pt});
+                               &(const V3D_SmoothParams) { .quat = quat_new, .dyn_ofs = dyn_ofs_pt, });
 
                        return OPERATOR_FINISHED;
                }
@@ -4188,7 +4190,7 @@ static int viewroll_exec(bContext *C, wmOperator *op)
 
                ED_view3d_smooth_view(
                        C, v3d, ar, smooth_viewtx,
-                       &(const V3D_SmoothParams) {.quat = quat_new, .dyn_ofs = dyn_ofs_pt});
+                       &(const V3D_SmoothParams) { .quat = quat_new, .dyn_ofs = dyn_ofs_pt, });
 
                viewops_data_free(C, op);
                return OPERATOR_FINISHED;
index bf37f9c..6d6f370 100644 (file)
@@ -348,7 +348,7 @@ static void gizmo_render_border_prop_matrix_set(
 
        BLI_rctf_resize(border, len_v3(matrix[0]), len_v3(matrix[1]));
        BLI_rctf_recenter(border, matrix[3][0], matrix[3][1]);
-       BLI_rctf_isect(&(rctf){.xmin = 0, .ymin = 0, .xmax = 1, .ymax = 1}, border, border);
+       BLI_rctf_isect(&(rctf){ .xmin = 0, .ymin = 0, .xmax = 1, .ymax = 1, }, border, border);
 }
 
 static bool WIDGETGROUP_camera_view_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
@@ -416,7 +416,7 @@ static void WIDGETGROUP_camera_view_draw_prepare(const bContext *C, wmGizmoGroup
                ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, &viewgroup->state.view_border, false);
        }
        else {
-               viewgroup->state.view_border = (rctf){.xmin = 0, .ymin = 0, .xmax = ar->winx, .ymax = ar->winy};
+               viewgroup->state.view_border = (rctf){ .xmin = 0, .ymin = 0, .xmax = ar->winx, .ymax = ar->winy, };
        }
 
        wmGizmo *gz = viewgroup->border;
index e3b31a6..24143c3 100644 (file)
@@ -605,7 +605,8 @@ static void sync_viewport_camera_smoothview(bContext *C, View3D *v3d, Object *ob
                                                                                            .ofs = other_rv3d->ofs,
                                                                                            .quat = other_rv3d->viewquat,
                                                                                            .dist = &other_rv3d->dist,
-                                                                                           .lens = &other_v3d->lens});
+                                                                                           .lens = &other_v3d->lens,
+                                                                                       });
                                                                        }
                                                                        else {
                                                                                other_v3d->camera = ob;
@@ -651,7 +652,8 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *op)
                                &(const V3D_SmoothParams) {
                                    .camera_old = camera_old, .camera = v3d->camera,
                                    .ofs = rv3d->ofs, .quat = rv3d->viewquat,
-                                   .dist = &rv3d->dist, .lens = &v3d->lens});
+                                   .dist = &rv3d->dist, .lens = &v3d->lens,
+                               });
                }
 
                if (v3d->scenelock) {
@@ -1245,7 +1247,8 @@ static bool view3d_localview_init(
                                            &(const V3D_SmoothParams) {
                                                .camera_old = camera_old,
                                                .ofs = ofs_new, .quat = rv3d->viewquat,
-                                               .dist = ok_dist ? &dist_new : NULL, .lens = &v3d->lens});
+                                               .dist = ok_dist ? &dist_new : NULL, .lens = &v3d->lens,
+                                           });
                        }
                }
 
@@ -1303,7 +1306,8 @@ static void restore_localviewdata(
                                        &(const V3D_SmoothParams) {
                                            .camera_old = camera_old_rv3d, .camera = camera_new_rv3d,
                                            .ofs = rv3d->localvd->ofs, .quat = rv3d->localvd->viewquat,
-                                           .dist = &rv3d->localvd->dist});
+                                           .dist = &rv3d->localvd->dist,
+                                       });
 
                                if (free) {
                                        MEM_freeN(rv3d->localvd);
index 441141e..67991bb 100644 (file)
@@ -438,7 +438,7 @@ static void gizmo_mesh_extrude_message_subscribe(
        WM_msg_subscribe_rna_params(
                mbus,
                &(const wmMsgParams_RNA){
-                   .ptr = (PointerRNA){.type = gzgroup->type->srna},
+                   .ptr = (PointerRNA){ .type = gzgroup->type->srna, },
                    .prop = ggd->gzgt_axis_type_prop,
                },
                &msg_sub_value_gz_tag_refresh, __func__);
index ef49f97..3f01d51 100644 (file)
@@ -119,21 +119,21 @@ void GPU_framebuffer_texture_detach_slot(
 void GPU_framebuffer_config_array(GPUFrameBuffer *fb, const GPUAttachment *config, int config_len);
 
 #define GPU_ATTACHMENT_NONE \
-        {.tex = NULL, .layer = -1, .mip = 0}
+        { .tex = NULL, .layer = -1, .mip = 0, }
 #define GPU_ATTACHMENT_LEAVE \
-        {.tex = NULL, .layer = -1, .mip = -1}
+        { .tex = NULL, .layer = -1, .mip = -1, }
 #define GPU_ATTACHMENT_TEXTURE(_tex) \
-        {.tex = _tex, .layer = -1, .mip = 0}
+        { .tex = _tex, .layer = -1, .mip = 0, }
 #define GPU_ATTACHMENT_TEXTURE_MIP(_tex, _mip) \
-        {.tex = _tex, .layer = -1, .mip = _mip}
+        { .tex = _tex, .layer = -1, .mip = _mip, }
 #define GPU_ATTACHMENT_TEXTURE_LAYER(_tex, _layer) \
-        {.tex = _tex, .layer = _layer, .mip = 0}
+        { .tex = _tex, .layer = _layer, .mip = 0, }
 #define GPU_ATTACHMENT_TEXTURE_LAYER_MIP(_tex, _layer, _mip) \
-        {.tex = _tex, .layer = _layer, .mip = _mip}
+        { .tex = _tex, .layer = _layer, .mip = _mip, }
 #define GPU_ATTACHMENT_TEXTURE_CUBEFACE(_tex, _face) \
-        {.tex = _tex, .layer = _face, .mip = 0}
+        { .tex = _tex, .layer = _face, .mip = 0, }
 #define GPU_ATTACHMENT_TEXTURE_CUBEFACE_MIP(_tex, _face, _mip) \
-        {.tex = _tex, .layer = _face, .mip = _mip}
+        { .tex = _tex, .layer = _face, .mip = _mip, }
 
 /* Framebuffer operations */
 
index c1be2cd..d18f660 100644 (file)
@@ -1019,7 +1019,7 @@ static PyObject *bpy_bmesh_from_object(BPy_BMesh *self, PyObject *args, PyObject
 
        BM_mesh_bm_from_me(
                bm, me_eval, (&(struct BMeshFromMeshParams){
-                   .calc_face_normal = use_fnorm
+                   .calc_face_normal = use_fnorm,
                }));
 
        Py_RETURN_NONE;
index c1d6f1f..538b7e3 100644 (file)
@@ -269,7 +269,7 @@ void WM_msg_publish_ID(
        WM_msg_subscribe_rna_params( \
                mbus, \
                &(const wmMsgParams_RNA){ \
-                   .ptr = (PointerRNA){.type = &RNA_##type_}, \
+                   .ptr = (PointerRNA){ .type = &RNA_##type_, }, \
                    .prop = NULL, \
                }, \
                value, __func__); \
@@ -281,7 +281,7 @@ void WM_msg_publish_ID(
        WM_msg_subscribe_rna_params( \
                mbus, \
                &(const wmMsgParams_RNA){ \
-                   .ptr = (PointerRNA){.type = &RNA_##type_}, \
+                   .ptr = (PointerRNA){ .type = &RNA_##type_, }, \
                    .prop = &rna_##type_##_##prop_, \
                }, \
                value, __func__); \