diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-03 02:26:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-03 02:26:00 +0400 |
commit | 3c1b5b56324377816063975bd5d245f9d321a59a (patch) | |
tree | 809b28d4be2dc096b7631837856876c0fe710604 /source/blender | |
parent | 2ff9b5a7f57450ab0fd1d354c2d18fa10486f699 (diff) |
stule cleanup: edits for files which were recently cleaned up.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 7 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.c | 10 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.c | 28 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 4 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_boolean_util.c | 2 |
9 files changed, 31 insertions, 30 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index b457e71affd..2b38c5fff4b 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -583,10 +583,11 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm, GPU_normal_setup( dm ); if ( !GPU_buffer_legacy(dm) ) { glShadeModel(GL_SMOOTH); - for ( a = 0; a < dm->drawObject->totmaterial; a++ ) { - if ( setMaterial(dm->drawObject->materials[a].mat_nr+1, NULL) ) + for (a = 0; a < dm->drawObject->totmaterial; a++) { + if (setMaterial(dm->drawObject->materials[a].mat_nr + 1, NULL)) { glDrawArrays(GL_TRIANGLES, dm->drawObject->materials[a].start, - dm->drawObject->materials[a].totpoint); + dm->drawObject->materials[a].totpoint); + } } } GPU_buffer_unbind( ); diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 40d829808ca..872f678d456 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -1633,7 +1633,7 @@ static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData #pragma omp parallel for schedule(static) for (i=0; i<totpoly; i++) { int j=0; - Material *material = give_current_material(ob, mp[i].mat_nr+1); + Material *material = give_current_material(ob, mp[i].mat_nr + 1); for (; j<mp[i].totloop; j++) { int l_index = mp[i].loopstart + j; diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index 3117c74c1a7..223815c168f 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -440,29 +440,29 @@ void BM_select_mode_set(BMesh *bm, int selectmode) * counts number of elements with flag enabled/disabled */ static int bm_mesh_flag_count(BMesh *bm, const char htype, const char hflag, - int respecthide, int test_for_enabled) + int respecthide, int test_for_enabled) { BMElem *ele; BMIter iter; - int test = (test_for_enabled ? hflag : 0); + const char hflag_test = (test_for_enabled ? hflag : 0); int tot = 0; if (htype & BM_VERT) { for (ele = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL); ele; ele = BM_iter_step(&iter)) { if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) continue; - if (BM_elem_flag_test(ele, hflag) == test) tot++; + if (BM_elem_flag_test(ele, hflag) == hflag_test) tot++; } } if (htype & BM_EDGE) { for (ele = BM_iter_new(&iter, bm, BM_EDGES_OF_MESH, NULL); ele; ele = BM_iter_step(&iter)) { if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) continue; - if (BM_elem_flag_test(ele, hflag) == test) tot++; + if (BM_elem_flag_test(ele, hflag) == hflag_test) tot++; } } if (htype & BM_FACE) { for (ele = BM_iter_new(&iter, bm, BM_FACES_OF_MESH, NULL); ele; ele = BM_iter_step(&iter)) { if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) continue; - if (BM_elem_flag_test(ele, hflag) == test) tot++; + if (BM_elem_flag_test(ele, hflag) == hflag_test) tot++; } } diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index e09be79633e..6b207fc3696 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -457,7 +457,7 @@ void BMO_slot_vec_get(BMOperator *op, const char *slotname, float r_vec[3]) */ static int bmo_mesh_flag_count(BMesh *bm, const char htype, const short oflag, - int test_for_enabled) + int test_for_enabled) { BMIter elements; int count = 0; @@ -693,8 +693,8 @@ static void BMO_slot_buffer_from_all(BMesh *bm, BMOperator *op, const char *slot * enabled/disabled into a slot for an operator. */ static void bmo_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname, - const char htype, const char hflag, - int test_for_enabled) + const char htype, const char hflag, + int test_for_enabled) { BMIter elements; BMElem *ele; @@ -747,13 +747,13 @@ static void bmo_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *sl } void BMO_slot_buffer_from_enabled_hflag(BMesh *bm, BMOperator *op, const char *slotname, - const char htype, const char hflag) + const char htype, const char hflag) { bmo_slot_buffer_from_hflag(bm, op, slotname, htype, hflag, TRUE); } void BMO_slot_buffer_from_disabled_hflag(BMesh *bm, BMOperator *op, const char *slotname, - const char htype, const char hflag) + const char htype, const char hflag) { bmo_slot_buffer_from_hflag(bm, op, slotname, htype, hflag, FALSE); } @@ -797,8 +797,8 @@ void BMO_slot_buffer_append(BMOperator *output_op, const char *output_slot_name, * into an output slot for an operator. */ static void bmo_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname, - const char htype, const short oflag, - int test_for_enabled) + const char htype, const short oflag, + int test_for_enabled) { BMIter elements; BMOpSlot *slot = BMO_slot_get(op, slotname); @@ -807,14 +807,14 @@ static void bmo_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slo if (test_for_enabled) totelement = BMO_mesh_enabled_flag_count(bm, htype, oflag); else - totelement = BMO_mesh_disabled_flag_count(bm, htype, oflag); + totelement = BMO_mesh_disabled_flag_count(bm, htype, oflag); BLI_assert(slot->slottype == BMO_OP_SLOT_ELEMENT_BUF); if (totelement) { BMHeader *ele; BMHeader **ele_array; - int test = (test_for_enabled ? oflag : 0); + const char hflag_test = (test_for_enabled ? oflag : 0); bmo_slot_buffer_alloc(op, slotname, totelement); @@ -822,7 +822,7 @@ static void bmo_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slo if (htype & BM_VERT) { for (ele = BM_iter_new(&elements, bm, BM_VERTS_OF_MESH, bm); ele; ele = BM_iter_step(&elements)) { - if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag) == test) { + if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag) == hflag_test) { ele_array[i] = ele; i++; } @@ -831,7 +831,7 @@ static void bmo_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slo if (htype & BM_EDGE) { for (ele = BM_iter_new(&elements, bm, BM_EDGES_OF_MESH, bm); ele; ele = BM_iter_step(&elements)) { - if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag) == test) { + if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag) == hflag_test) { ele_array[i] = ele; i++; } @@ -840,7 +840,7 @@ static void bmo_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slo if (htype & BM_FACE) { for (ele = BM_iter_new(&elements, bm, BM_FACES_OF_MESH, bm); ele; ele = BM_iter_step(&elements)) { - if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag) == test) { + if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag) == hflag_test) { ele_array[i] = ele; i++; } @@ -853,13 +853,13 @@ static void bmo_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slo } void BMO_slot_buffer_from_enabled_flag(BMesh *bm, BMOperator *op, const char *slotname, - const char htype, const short oflag) + const char htype, const short oflag) { bmo_slot_buffer_from_flag(bm, op, slotname, htype, oflag, TRUE); } void BMO_slot_buffer_from_disabled_flag(BMesh *bm, BMOperator *op, const char *slotname, - const char htype, const short oflag) + const char htype, const short oflag) { bmo_slot_buffer_from_flag(bm, op, slotname, htype, oflag, FALSE); } diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 5cea8d11c09..18f3094fa31 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -531,7 +531,7 @@ static Image *imapaint_face_image(const ImagePaintState *s, int face_index) if (scene_use_new_shading_nodes(s->scene)) { MFace *mf = &s->dm_mface[face_index]; - ED_object_get_active_image(s->ob, mf->mat_nr+1, &ima, NULL, NULL); + ED_object_get_active_image(s->ob, mf->mat_nr + 1, &ima, NULL, NULL); } else { MTFace *tf = &s->dm_mtface[face_index]; @@ -547,7 +547,7 @@ static Image *project_paint_face_image(const ProjPaintState *ps, MTFace *dm_mtfa if (ps->do_new_shading_nodes) { /* cached scene_use_new_shading_nodes result */ MFace *mf = ps->dm_mface + face_index; - ED_object_get_active_image(ps->ob, mf->mat_nr+1, &ima, NULL, NULL); + ED_object_get_active_image(ps->ob, mf->mat_nr + 1, &ima, NULL, NULL); } else { ima = dm_mtface[face_index].tpage; diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 55130406e7a..3c1c8ac9941 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -603,7 +603,7 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) if (efa) { Image *node_ima; - ED_object_get_active_image(obedit, efa->mat_nr+1, &node_ima, NULL, NULL); + ED_object_get_active_image(obedit, efa->mat_nr + 1, &node_ima, NULL, NULL); if (node_ima) sima->image = node_ima; diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 69ca67930b1..4bffc7098b3 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -191,7 +191,7 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im BMFace *efa= BM_active_face_get(em->bm, sloppy); if (efa) - ED_object_assign_active_image(bmain, obedit, efa->mat_nr+1, ima); + ED_object_assign_active_image(bmain, obedit, efa->mat_nr + 1, ima); } else { /* old shading system, assign image to selected faces */ diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 53555346caf..869cc0444aa 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -1774,7 +1774,7 @@ void GPU_draw_buffers(GPU_Buffers *buffers, DMSetMaterial setMaterial) if (buffers->totface) { const MFace *f = &buffers->mface[buffers->face_indices[0]]; - if (!setMaterial(f->mat_nr+1, NULL)) + if (!setMaterial(f->mat_nr + 1, NULL)) return; smooth = f->flag & ME_SMOOTH; @@ -1782,7 +1782,7 @@ void GPU_draw_buffers(GPU_Buffers *buffers, DMSetMaterial setMaterial) } else if (buffers->totgrid) { const DMFlagMat *f = &buffers->grid_flag_mats[buffers->grid_indices[0]]; - if (!setMaterial(f->mat_nr+1, NULL)) + if (!setMaterial(f->mat_nr + 1, NULL)) return; smooth = f->flag & ME_SMOOTH; diff --git a/source/blender/modifiers/intern/MOD_boolean_util.c b/source/blender/modifiers/intern/MOD_boolean_util.c index 7d4ec3c3d81..8341bc67107 100644 --- a/source/blender/modifiers/intern/MOD_boolean_util.c +++ b/source/blender/modifiers/intern/MOD_boolean_util.c @@ -418,7 +418,7 @@ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh( mface->v4 = (csgface.vertex_number == 4)? csgface.vertex_index[3]: 0; // set material, based on lookup in hash table - orig_mat= give_current_material(orig_ob, mface->mat_nr+1); + orig_mat = give_current_material(orig_ob, mface->mat_nr + 1); if (mat && orig_mat) { if (!BLI_ghash_haskey(material_hash, orig_mat)) { |