diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-26 07:32:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-26 07:32:35 +0300 |
commit | 7b61fe1638051b3b2e296680a000819f31672414 (patch) | |
tree | 7b640b7fb07ac3d1663fc683c903d3b5e33bbf42 /source/blender/blenlib | |
parent | 8d03e04493023d63ec05321ab8dc48dbd22363f2 (diff) |
Cleanup: use BLI_assert
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_matrix.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_rotation.c | 18 |
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index f07c2ec159e..cc29ebe4f20 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -153,7 +153,7 @@ void rgb_to_ycc(float r, float g, float b, float *ly, float *lcb, float *lcr, in cr = (0.5f * sr) - (0.41869f * sg) - (0.08131f * sb) + 128.0f; break; default: - assert(!"invalid colorspace"); + BLI_assert(!"invalid colorspace"); break; } diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 1452882fbba..2568d42566c 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -2013,7 +2013,7 @@ void rotate_m4(float mat[4][4], const char axis, const float angle) const float angle_cos = cosf(angle); const float angle_sin = sinf(angle); - assert(axis >= 'X' && axis <= 'Z'); + BLI_assert(axis >= 'X' && axis <= 'Z'); switch (axis) { case 'X': diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index 47814b1080c..e4b44240272 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -644,8 +644,8 @@ void vec_to_quat(float q[4], const float vec[3], short axis, const short upflag) float nor[3], tvec[3]; float angle, si, co, len; - assert(axis >= 0 && axis <= 5); - assert(upflag >= 0 && upflag <= 2); + BLI_assert(axis >= 0 && axis <= 5); + BLI_assert(upflag >= 0 && upflag <= 2); /* first set the quat to unit */ unit_qt(q); @@ -1194,7 +1194,7 @@ void axis_angle_to_quat_single(float q[4], const char axis, const float angle) const float angle_sin = sinf(angle_half); const int axis_index = (axis - 'X'); - assert(axis >= 'X' && axis <= 'Z'); + BLI_assert(axis >= 'X' && axis <= 'Z'); q[0] = angle_cos; zero_v3(q + 1); @@ -1398,7 +1398,7 @@ void rotate_eul(float beul[3], const char axis, const float ang) { float eul[3], mat1[3][3], mat2[3][3], totmat[3][3]; - assert(axis >= 'X' && axis <= 'Z'); + BLI_assert(axis >= 'X' && axis <= 'Z'); eul[0] = eul[1] = eul[2] = 0.0f; if (axis == 'X') { @@ -1544,7 +1544,7 @@ static const RotOrderInfo rotOrders[] = { */ static const RotOrderInfo *get_rotation_order_info(const short order) { - assert(order >= 0 && order <= 6); + BLI_assert(order >= 0 && order <= 6); if (order < 1) { return &rotOrders[0]; } @@ -1813,7 +1813,7 @@ void rotate_eulO(float beul[3], const short order, char axis, float ang) { float eul[3], mat1[3][3], mat2[3][3], totmat[3][3]; - assert(axis >= 'X' && axis <= 'Z'); + BLI_assert(axis >= 'X' && axis <= 'Z'); zero_v3(eul); @@ -2119,8 +2119,8 @@ void quat_apply_track(float quat[4], short axis, short upflag) {0.0, sqrt_1_2, sqrt_1_2, 0.0}, }; - assert(axis >= 0 && axis <= 5); - assert(upflag >= 0 && upflag <= 2); + BLI_assert(axis >= 0 && axis <= 5); + BLI_assert(upflag >= 0 && upflag <= 2); mul_qt_qtqt(quat, quat, quat_track[axis]); @@ -2142,7 +2142,7 @@ void vec_apply_track(float vec[3], short axis) { float tvec[3]; - assert(axis >= 0 && axis <= 5); + BLI_assert(axis >= 0 && axis <= 5); copy_v3_v3(tvec, vec); |