diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-31 12:21:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-31 12:21:04 +0300 |
commit | ad5b611953b6c2b510982e25218552a12d70437c (patch) | |
tree | 149e62b15328609fcd3ec809513817f6bb801a9d /source/blender | |
parent | a823f58dfd039291fe14bdf7d281ecaa0311292e (diff) |
Cleanup: style
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_mesh.c | 36 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 14 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_context.cpp | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 2 |
6 files changed, 30 insertions, 34 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index e6b8312734f..c542c3f927d 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -717,9 +717,9 @@ static void rigidbody_validate_sim_object(RigidBodyWorld *rbw, Object *ob, bool /* --------------------- */ static void rigidbody_constraint_init_spring( - RigidBodyCon *rbc, void (*set_spring)(rbConstraint*,int,int), - void (*set_stiffness)(rbConstraint*,int,float), void (*set_damping)(rbConstraint*,int,float) -) { + RigidBodyCon *rbc, void (*set_spring)(rbConstraint *, int, int), + void (*set_stiffness)(rbConstraint *, int, float), void (*set_damping)(rbConstraint *, int, float)) +{ set_spring(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->flag & RBC_FLAG_USE_SPRING_X); set_stiffness(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->spring_stiffness_x); set_damping(rbc->physics_constraint, RB_LIMIT_LIN_X, rbc->spring_damping_x); diff --git a/source/blender/blenkernel/intern/subdiv_mesh.c b/source/blender/blenkernel/intern/subdiv_mesh.c index 40c95964fb3..895d527ea5c 100644 --- a/source/blender/blenkernel/intern/subdiv_mesh.c +++ b/source/blender/blenkernel/intern/subdiv_mesh.c @@ -764,7 +764,8 @@ static void subdiv_evaluate_corner_vertices_regular( const MLoop *coarse_loop = &coarse_mloop[coarse_poly->loopstart + corner]; if (BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_vertices_used_map, - coarse_loop->v)) { + coarse_loop->v)) + { continue; } const MVert *coarse_vert = &coarse_mvert[coarse_loop->v]; @@ -798,7 +799,8 @@ static void subdiv_evaluate_corner_vertices_special( const MLoop *coarse_loop = &coarse_mloop[coarse_poly->loopstart + corner]; if (BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_vertices_used_map, - coarse_loop->v)) { + coarse_loop->v)) + { continue; } const MVert *coarse_vert = &coarse_mvert[coarse_loop->v]; @@ -847,7 +849,8 @@ static void subdiv_evaluate_edge_vertices_regular( const MLoop *coarse_loop = &coarse_mloop[coarse_poly->loopstart + corner]; if (BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_edges_used_map, - coarse_loop->e)) { + coarse_loop->e)) + { continue; } vertex_interpolation_from_ptex(ctx, @@ -860,8 +863,8 @@ static void subdiv_evaluate_edge_vertices_regular( ctx->vertices_edge_offset + coarse_loop->e * num_subdiv_vertices_per_coarse_edge]; for (int vertex_index = 0; - vertex_index < num_subdiv_vertices_per_coarse_edge; - vertex_index++, subdiv_vert++) + vertex_index < num_subdiv_vertices_per_coarse_edge; + vertex_index++, subdiv_vert++) { float fac = (vertex_index + 1) * inv_resolution_1; if (flip) { @@ -918,7 +921,8 @@ static void subdiv_evaluate_edge_vertices_special( const MLoop *coarse_loop = &coarse_mloop[coarse_poly->loopstart + corner]; if (BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_edges_used_map, - coarse_loop->e)) { + coarse_loop->e)) + { continue; } vertex_interpolation_from_ptex(ctx, @@ -936,8 +940,8 @@ static void subdiv_evaluate_edge_vertices_special( veretx_delta = -1; } for (int vertex_index = 1; - vertex_index < num_vertices_per_ptex_edge; - vertex_index++, subdiv_vert += veretx_delta) + vertex_index < num_vertices_per_ptex_edge; + vertex_index++, subdiv_vert += veretx_delta) { float u = vertex_index * inv_ptex_resolution_1; subdiv_vertex_data_interpolate(ctx, @@ -953,8 +957,8 @@ static void subdiv_evaluate_edge_vertices_special( const int next_ptex_face_index = ptex_face_start_index + (corner + 1) % coarse_poly->totloop; for (int vertex_index = 1; - vertex_index < num_vertices_per_ptex_edge - 1; - vertex_index++, subdiv_vert += veretx_delta) + vertex_index < num_vertices_per_ptex_edge - 1; + vertex_index++, subdiv_vert += veretx_delta) { float v = 1.0f - vertex_index * inv_ptex_resolution_1; subdiv_vertex_data_interpolate(ctx, @@ -1416,7 +1420,8 @@ static void subdiv_create_edges_all_patches_special( subdiv_copy_edge_data(ctx, subdiv_edge, NULL); if (flip) { subdiv_edge->v1 = start_edge_vertex + (resolution - i - 3); - } else { + } + else { subdiv_edge->v1 = start_edge_vertex + i; } subdiv_edge->v2 = side_start_index + i; @@ -1433,7 +1438,8 @@ static void subdiv_create_edges_all_patches_special( subdiv_copy_edge_data(ctx, subdiv_edge, NULL); if (flip) { subdiv_edge->v1 = start_edge_vertex + (resolution - i - 3); - } else { + } + else { subdiv_edge->v1 = start_edge_vertex + i; } subdiv_edge->v2 = side_start_index + @@ -1762,7 +1768,8 @@ static void subdiv_create_loops_regular(SubdivMeshContext *ctx, e0 = ctx->edge_boundary_offset + coarse_loop->e * num_subdiv_edges_per_coarse_edge + num_subdiv_edges_per_coarse_edge - i - 1; - } else { + } + else { e0 = ctx->edge_boundary_offset + coarse_loop->e * num_subdiv_edges_per_coarse_edge + i; @@ -2040,7 +2047,8 @@ static void subdiv_create_loops_special(SubdivMeshContext *ctx, e0 = ctx->edge_boundary_offset + coarse_loop->e * num_subdiv_edges_per_coarse_edge + num_subdiv_edges_per_coarse_edge - i - 1; - } else { + } + else { e0 = ctx->edge_boundary_offset + coarse_loop->e * num_subdiv_edges_per_coarse_edge + i; diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 7339f1977ff..93577315b1c 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1645,7 +1645,9 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_VIEW3D) { View3D *v3d = (View3D *)sl; - v3d->shading.background_type = (v3d->flag3 & V3D_SHOW_WORLD)? V3D_SHADING_BACKGROUND_WORLD: V3D_SHADING_BACKGROUND_THEME; + v3d->shading.background_type = ( + (v3d->flag3 & V3D_SHOW_WORLD) ? + V3D_SHADING_BACKGROUND_WORLD : V3D_SHADING_BACKGROUND_THEME); copy_v3_fl(v3d->shading.background_color, 0.05f); } } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 513bfd32191..07d259dd047 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -4296,20 +4296,6 @@ eAutoPropButsReturn uiTemplateOperatorPropertyButs( PointerRNA ptr; struct uiTemplateOperatorPropertyPollParam user_data = {.C = C, .op = op, .flag = flag}; - - -#if 0 -static bool template_operator_redo_property_buts_poll(PointerRNA *UNUSED(ptr), PropertyRNA *prop) -{ -} -#endif - - - - - - - RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); uiLayoutSetPropSep(layout, true); diff --git a/source/blender/gpu/intern/gpu_context.cpp b/source/blender/gpu/intern/gpu_context.cpp index 3f2ce958332..8d8f4d12b04 100644 --- a/source/blender/gpu/intern/gpu_context.cpp +++ b/source/blender/gpu/intern/gpu_context.cpp @@ -23,7 +23,7 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/gpu/intern/gpu_vertex_array_id.cpp +/** \file blender/gpu/intern/gpu_context.cpp * \ingroup gpu * * Manage GL vertex array IDs in a thread-safe way diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index dd4013efdf2..3083607b8a9 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -2169,7 +2169,7 @@ ViewLayer *WM_window_get_active_view_layer(const wmWindow *win) view_layer = BKE_view_layer_default_view(scene); if (view_layer) { - WM_window_set_active_view_layer((wmWindow*)win, view_layer); + WM_window_set_active_view_layer((wmWindow *)win, view_layer); } return view_layer; |