diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-10 10:18:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-10 10:18:03 +0400 |
commit | f9f707033665dc737f1011e82406a12fafa78326 (patch) | |
tree | f1c69f7f99ec010b529be0f0724b39e80d1303ce /source/blender/python/mathutils | |
parent | f99be71850f6f40715f6b8f6fe9058fb66470dfa (diff) |
add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh.
Diffstat (limited to 'source/blender/python/mathutils')
-rw-r--r-- | source/blender/python/mathutils/mathutils_Matrix.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index da2888045d0..1fcebf29f28 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -829,10 +829,10 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args) mat[0] = 1.0f; mat[3] = 1.0f; - if (strcmp(plane, "X") == 0) { + if (STREQ(plane, "X")) { mat[2] = factor; } - else if (strcmp(plane, "Y") == 0) { + else if (STREQ(plane, "Y")) { mat[1] = factor; } else { @@ -855,15 +855,15 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args) mat[4] = 1.0f; mat[8] = 1.0f; - if (strcmp(plane, "XY") == 0) { + if (STREQ(plane, "XY")) { mat[6] = factor[0]; mat[7] = factor[1]; } - else if (strcmp(plane, "XZ") == 0) { + else if (STREQ(plane, "XZ")) { mat[3] = factor[0]; mat[5] = factor[1]; } - else if (strcmp(plane, "YZ") == 0) { + else if (STREQ(plane, "YZ")) { mat[1] = factor[0]; mat[2] = factor[1]; } |