remove some redundant checks and compiler warnings.

This commit is contained in:
2011-10-02 12:21:24 +00:00
parent 90b38eaa0c
commit a1d647e92c
2 changed files with 12 additions and 13 deletions

View File

@@ -2612,7 +2612,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
}
else if (t->flag & T_EDIT) {
if(t->around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
if(t->settings->selectmode & SCE_SELECT_FACE) {
copy_v3_v3(center, td->center);
}
else {
@@ -2905,12 +2905,10 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
if (t->flag & (T_OBJECT|T_POSE)) {
center = td->center;
}
else {
if(around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
else if (t->settings->selectmode & SCE_SELECT_FACE) {
center = td->center;
}
}
}
if (t->flag & T_POINTS) {
mul_m3_m3m3(totmat, mat, td->mtx);

View File

@@ -94,11 +94,12 @@ int mathutils_array_parse(float *array, int array_min, int array_max, PyObject *
#if 1 /* approx 6x speedup for mathutils types */
int size;
if( (VectorObject_Check(value) && (size= ((VectorObject *)value)->size)) ||
(EulerObject_Check(value) && (size= 3)) ||
(QuaternionObject_Check(value) && (size= 4)) ||
(ColorObject_Check(value) && (size= 3))
) {
if( (size= VectorObject_Check(value) ? ((VectorObject *)value)->size : 0) ||
(size= EulerObject_Check(value) ? 3 : 0) ||
(size= QuaternionObject_Check(value) ? 4 : 0) ||
(size= ColorObject_Check(value) ? 3 : 0))
{
printf("siez %d\n", size);
if(BaseMath_ReadCallback((BaseMathObject *)value) == -1) {
return -1;
}