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>2019-08-26 07:32:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-26 07:32:35 +0300
commit7b61fe1638051b3b2e296680a000819f31672414 (patch)
tree7b640b7fb07ac3d1663fc683c903d3b5e33bbf42 /source/blender
parent8d03e04493023d63ec05321ab8dc48dbd22363f2 (diff)
Cleanup: use BLI_assert
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c2
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c6
-rw-r--r--source/blender/blenlib/intern/math_color.c2
-rw-r--r--source/blender/blenlib/intern/math_matrix.c2
-rw-r--r--source/blender/blenlib/intern/math_rotation.c18
-rw-r--r--source/blender/editors/space_info/textview.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c4
-rw-r--r--source/blender/modifiers/intern/MOD_remesh.c4
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
9 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index e3df3dd9ba2..85a12027bf2 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -1666,7 +1666,7 @@ void bvhcache_insert(BVHCache **cache_p, BVHTree *tree, int type)
{
BVHCacheItem *item = NULL;
- assert(bvhcache_find(*cache_p, type, &(BVHTree *){0}) == false);
+ BLI_assert(bvhcache_find(*cache_p, type, &(BVHTree *){0}) == false);
item = MEM_mallocN(sizeof(BVHCacheItem), "BVHCacheItem");
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 04cbdbb6bcd..91b169590ac 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -2755,7 +2755,7 @@ static bool dynamicPaint_symmetrizeAdjData(PaintAdjData *ed, int active_points)
for (int i = 0, idx = ed->n_index[index]; i < ed->n_num[index]; i++) {
const int target = ed->n_target[idx + i];
- assert(!(ed->flags[target] & ADJ_BORDER_PIXEL));
+ BLI_assert(!(ed->flags[target] & ADJ_BORDER_PIXEL));
if (!dynamicPaint_pointHasNeighbor(ed, target, index)) {
new_n_num[target]++;
@@ -2782,7 +2782,7 @@ static bool dynamicPaint_symmetrizeAdjData(PaintAdjData *ed, int active_points)
new_n_num[index] = ed->n_num[index];
}
- assert(n_pos == total_targets);
+ BLI_assert(n_pos == total_targets);
/* Add symmetrized - this loop behavior must exactly match the count pass above */
for (int index = 0; index < active_points; index++) {
@@ -5572,7 +5572,7 @@ static void dynamic_paint_border_cb(void *__restrict userdata,
PaintPoint *pPoint2 = &((PaintPoint *)sData->type_data)[target];
- assert(!(sData->adj_data->flags[target] & ADJ_BORDER_PIXEL));
+ BLI_assert(!(sData->adj_data->flags[target] & ADJ_BORDER_PIXEL));
madd_v3_v3fl(mix_color, pPoint2->color, pPoint2->color[3]);
mix_color[3] += pPoint2->color[3];
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);
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index 24d3008b1e7..97d5faa9c13 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -313,7 +313,7 @@ int textview_draw(
/* constants for the sequencer context */
cdc.font_id = font_id;
cdc.cwidth = (int)BLF_fixed_width(font_id);
- assert(cdc.cwidth > 0);
+ BLI_assert(cdc.cwidth > 0);
cdc.lheight = tvc->lheight;
cdc.lofs = -BLF_descender(font_id);
/* note, scroll bar must be already subtracted () */
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 37ea10773bf..1c9ce142165 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1318,7 +1318,7 @@ static bool view3d_lasso_select(
changed = do_lasso_select_meta(vc, mcords, moves, sel_op);
break;
default:
- assert(!"lasso select on incorrect object type");
+ BLI_assert(!"lasso select on incorrect object type");
break;
}
@@ -3266,7 +3266,7 @@ static int view3d_box_select_exec(bContext *C, wmOperator *op)
}
break;
default:
- assert(!"box select on incorrect object type");
+ BLI_assert(!"box select on incorrect object type");
break;
}
changed_multi |= changed;
diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c
index 23da1ec2754..631401d9d9e 100644
--- a/source/blender/modifiers/intern/MOD_remesh.c
+++ b/source/blender/modifiers/intern/MOD_remesh.c
@@ -105,7 +105,7 @@ static void dualcon_add_vert(void *output_v, const float co[3])
DualConOutput *output = output_v;
Mesh *mesh = output->mesh;
- assert(output->curvert < mesh->totvert);
+ BLI_assert(output->curvert < mesh->totvert);
copy_v3_v3(mesh->mvert[output->curvert].co, co);
output->curvert++;
@@ -119,7 +119,7 @@ static void dualcon_add_quad(void *output_v, const int vert_indices[4])
MPoly *cur_poly;
int i;
- assert(output->curface < mesh->totpoly);
+ BLI_assert(output->curface < mesh->totpoly);
mloop = mesh->mloop;
cur_poly = &mesh->mpoly[output->curface];
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index c79bae5b717..b10a4ce6794 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1111,7 +1111,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
/* if register is not enabled, the operator gets freed on OPERATOR_FINISHED
* ui_apply_but_funcs_after calls ED_undo_operator_repeate_cb and crashes */
- assert(op->type->flag & OPTYPE_REGISTER);
+ BLI_assert(op->type->flag & OPTYPE_REGISTER);
UI_block_func_handle_set(block, wm_block_redo_cb, arg_op);
layout = UI_block_layout(