diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-07 17:12:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-07 17:23:25 +0300 |
commit | 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 (patch) | |
tree | 0283a5c819d1e709edfd0de814636aa83a9b1033 /source/blender/blenkernel/intern/subdiv_mesh.c | |
parent | ab823176d31dc155645de733f1cd4fbd6ad74592 (diff) |
Cleanup: use post increment/decrement
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_mesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_mesh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_mesh.c b/source/blender/blenkernel/intern/subdiv_mesh.c index 9d713d1937d..1604c2560ff 100644 --- a/source/blender/blenkernel/intern/subdiv_mesh.c +++ b/source/blender/blenkernel/intern/subdiv_mesh.c @@ -82,7 +82,7 @@ static void subdiv_mesh_ctx_cache_uv_layers(SubdivMeshContext *ctx) { Mesh *subdiv_mesh = ctx->subdiv_mesh; ctx->num_uv_layers = CustomData_number_of_layers(&subdiv_mesh->ldata, CD_MLOOPUV); - for (int layer_index = 0; layer_index < ctx->num_uv_layers; ++layer_index) { + for (int layer_index = 0; layer_index < ctx->num_uv_layers; layer_index++) { ctx->uv_layers[layer_index] = CustomData_get_layer_n( &subdiv_mesh->ldata, CD_MLOOPUV, layer_index); } @@ -220,7 +220,7 @@ static void vertex_interpolation_init(const SubdivMeshContext *ctx, const float weight = 1.0f / (float)coarse_poly->totloop; float *weights = BLI_array_alloca(weights, coarse_poly->totloop); int *indices = BLI_array_alloca(indices, coarse_poly->totloop); - for (int i = 0; i < coarse_poly->totloop; ++i) { + for (int i = 0; i < coarse_poly->totloop; i++) { weights[i] = weight; indices[i] = coarse_mloop[coarse_poly->loopstart + i].v; } @@ -352,7 +352,7 @@ static void loop_interpolation_init(const SubdivMeshContext *ctx, const float weight = 1.0f / (float)coarse_poly->totloop; float *weights = BLI_array_alloca(weights, coarse_poly->totloop); int *indices = BLI_array_alloca(indices, coarse_poly->totloop); - for (int i = 0; i < coarse_poly->totloop; ++i) { + for (int i = 0; i < coarse_poly->totloop; i++) { weights[i] = weight; indices[i] = coarse_poly->loopstart + i; } |