Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-06 04:30:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-06 04:32:54 +0300
commitaa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch)
tree1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/blenlib/intern/math_matrix.c
parent7cb20d841da16d0bffb63154403267500e9941f5 (diff)
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/blenlib/intern/math_matrix.c')
-rw-r--r--source/blender/blenlib/intern/math_matrix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 1de69499c8d..6b5efc3f8c4 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -274,7 +274,7 @@ void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void mul_m4_m4m4_uniq(float R[4][4], const float A[4][4], const float B[4][4])
{
- BLI_assert(R != A && R != B);
+ BLI_assert(!ELEM(R, A, B));
/* matrix product: R[j][k] = A[j][i] . B[i][k] */
#ifdef __SSE2__
@@ -319,7 +319,7 @@ void mul_m4_m4m4_uniq(float R[4][4], const float A[4][4], const float B[4][4])
void mul_m4_m4m4_db_uniq(double R[4][4], const double A[4][4], const double B[4][4])
{
- BLI_assert(R != A && R != B);
+ BLI_assert(!ELEM(R, A, B));
/* matrix product: R[j][k] = A[j][i] . B[i][k] */
@@ -347,7 +347,7 @@ void mul_m4_m4m4_db_uniq(double R[4][4], const double A[4][4], const double B[4]
void mul_m4db_m4db_m4fl_uniq(double R[4][4], const double A[4][4], const float B[4][4])
{
/* Remove second check since types don't match. */
- BLI_assert(R != A /* && R != B */);
+ BLI_assert(!ELEM(R, A /*, B */));
/* matrix product: R[j][k] = A[j][i] . B[i][k] */
@@ -419,7 +419,7 @@ void mul_m3_m3_post(float R[3][3], const float B[3][3])
void mul_m3_m3m3_uniq(float R[3][3], const float A[3][3], const float B[3][3])
{
- BLI_assert(R != A && R != B);
+ BLI_assert(!ELEM(R, A, B));
R[0][0] = B[0][0] * A[0][0] + B[0][1] * A[1][0] + B[0][2] * A[2][0];
R[0][1] = B[0][0] * A[0][1] + B[0][1] * A[1][1] + B[0][2] * A[2][1];