diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-02 16:21:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-02 16:21:24 +0400 |
commit | a1d647e92cd7f51659f0bcb16fb05c1b30177b79 (patch) | |
tree | 0dc737dc1507aec54ce930abdc878071151ce779 /source/blender/python/mathutils/mathutils.c | |
parent | 90b38eaa0c05754ef8bab20b6bdc906dd506fa6c (diff) |
remove some redundant checks and compiler warnings.
Diffstat (limited to 'source/blender/python/mathutils/mathutils.c')
-rw-r--r-- | source/blender/python/mathutils/mathutils.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index 50b75b09cb2..c6cbb04edd0 100644 --- a/source/blender/python/mathutils/mathutils.c +++ b/source/blender/python/mathutils/mathutils.c @@ -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; } |