remove redundant casts

This commit is contained in:
Campbell Barton 2015-07-12 02:53:37 +10:00
parent eed7efa151
commit 3a810bfed6
4 changed files with 7 additions and 7 deletions

View File

@ -1813,7 +1813,7 @@ void BKE_mesh_smooth_flag_set(Object *meshOb, int enableSmooth)
int i;
for (i = 0; i < me->totpoly; i++) {
MPoly *mp = &((MPoly *) me->mpoly)[i];
MPoly *mp = &me->mpoly[i];
if (enableSmooth) {
mp->flag |= ME_SMOOTH;
@ -1824,7 +1824,7 @@ void BKE_mesh_smooth_flag_set(Object *meshOb, int enableSmooth)
}
for (i = 0; i < me->totface; i++) {
MFace *mf = &((MFace *) me->mface)[i];
MFace *mf = &me->mface[i];
if (enableSmooth) {
mf->flag |= ME_SMOOTH;

View File

@ -338,7 +338,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
eset = BLI_edgeset_new_ex(__func__, BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(totface));
for (i = 0; i < totface; i++) {
MPoly *mp = &((MPoly *) mpoly)[i];
MPoly *mp = &mpoly[i];
int nverts = mp->totloop;
int j, j_next;
CCGFace *origf = ccgSubSurf_getFace(origss, SET_INT_IN_POINTER(i));

View File

@ -2987,8 +2987,8 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
if ((me->editflag & ME_EDIT_PAINT_FACE_SEL) && me->mpoly) {
for (index = 0; index < totindex; index++) {
if (indexar[index] && indexar[index] <= me->totpoly) {
MPoly *mpoly = ((MPoly *)me->mpoly) + (indexar[index] - 1);
const MPoly *mpoly = &me->mpoly[indexar[index] - 1];
if ((mpoly->flag & ME_FACE_SEL) == 0)
indexar[index] = 0;
}

View File

@ -1255,7 +1255,7 @@ static void outliner_add_library_contents(Main *mainvar, SpaceOops *soops, TreeE
break;
if (id) {
ten = outliner_add_element(soops, &te->subtree, (void *)lbarray[a], NULL, TSE_ID_BASE, 0);
ten = outliner_add_element(soops, &te->subtree, lbarray[a], NULL, TSE_ID_BASE, 0);
ten->directdata = lbarray[a];
ten->name = (char *)BKE_idcode_to_name_plural(GS(id->name));
@ -1295,7 +1295,7 @@ static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOops *soops)
* - Add a parameter to BKE_idcode_to_name_plural to get a sane "user-visible" name instead?
* - Ensure that this uses nice icons for the datablock type involved instead of the dot?
*/
ten = outliner_add_element(soops, &soops->tree, (void *)lbarray[a], NULL, TSE_ID_BASE, 0);
ten = outliner_add_element(soops, &soops->tree, lbarray[a], NULL, TSE_ID_BASE, 0);
ten->directdata = lbarray[a];
ten->name = (char *)BKE_idcode_to_name_plural(GS(id->name));