diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-09 18:12:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-09 18:12:08 +0300 |
commit | 00b8c9e7eaef445be425f06111c91a92edf4406b (patch) | |
tree | 81437a6af43d74a44f9c467eeb58b0c6424446d7 /source/blender | |
parent | 9cb71d1159a1cd8aa110e195d42828f863cdd02a (diff) |
rename BKE_assert() --> BLI_assert().
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/key.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_utildefines.h | 12 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_manipulator.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 4 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils_matrix.c | 2 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils_quat.c | 2 | ||||
-rw-r--r-- | source/blender/python/generic/mathutils_vector.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 12 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 2 |
14 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 61865f5579c..71c3e76c207 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2452,7 +2452,7 @@ void DAG_id_tag_update(ID *id, short flag) } } else { - BKE_assert(!"invalid flag for this 'idtype'"); + BLI_assert(!"invalid flag for this 'idtype'"); } } } diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 328fb1b6a49..0955ccd170e 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -552,7 +552,7 @@ static short key_pointer_size(const Key *key, const int mode, int *poinsize, int break; default: - BKE_assert(!"invalid 'key->from' ID type"); + BLI_assert(!"invalid 'key->from' ID type"); return FALSE; } @@ -641,7 +641,7 @@ static void cp_key(const int start, int end, const int tot, char *poin, Key *key /* should never happen */ if(freek1) MEM_freeN(freek1); if(freekref) MEM_freeN(freekref); - BKE_assert(!"invalid 'cp[1]'"); + BLI_assert(!"invalid 'cp[1]'"); return; } @@ -777,7 +777,7 @@ void do_rel_key(const int start, int end, const int tot, char *basispoin, Key *k /* should never happen */ if(freefrom) MEM_freeN(freefrom); if(freereffrom) MEM_freeN(freereffrom); - BKE_assert(!"invalid 'cp[1]'"); + BLI_assert(!"invalid 'cp[1]'"); return; } @@ -944,7 +944,7 @@ static void do_key(const int start, int end, const int tot, char *poin, Key *key if(freek2) MEM_freeN(freek2); if(freek3) MEM_freeN(freek3); if(freek4) MEM_freeN(freek4); - BKE_assert(!"invalid 'cp[1]'"); + BLI_assert(!"invalid 'cp[1]'"); return; } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index c943b2fcfed..0ac98256b07 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2552,7 +2552,7 @@ void object_handle_update(Scene *scene, Object *ob) { #if 0 // XXX, comment for 2.56a release, background wont set 'scene->customdata_mask' EditMesh *em = (ob == scene->obedit)? BKE_mesh_get_editmesh(ob->data): NULL; - BKE_assert((scene->customdata_mask & CD_MASK_BAREMESH) == CD_MASK_BAREMESH); + BLI_assert((scene->customdata_mask & CD_MASK_BAREMESH) == CD_MASK_BAREMESH); if(em) { makeDerivedMesh(scene, ob, em, scene->customdata_mask); /* was CD_MASK_BAREMESH */ BKE_mesh_end_editmesh(ob->data, em); diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 468c146a65d..ccda9c17d43 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -181,7 +181,7 @@ #endif -/* BKE_assert(), default only to print +/* BLI_assert(), default only to print * for aborting need to define WITH_ASSERT_ABORT */ #if !defined NDEBUG @@ -191,28 +191,28 @@ # define _dummy_abort() (void)0 # endif # ifdef __GNUC__ /* just want to check if __func__ is available */ -# define BKE_assert(a) \ +# define BLI_assert(a) \ do { \ if (0 == (a)) { \ fprintf(stderr, \ - "BKE_assert failed: %s, %s(), %d at \'%s\'\n", \ + "BLI_assert failed: %s, %s(), %d at \'%s\'\n", \ __FILE__, __func__, __LINE__, STRINGIFY(a)); \ _dummy_abort(); \ } \ } while (0) # else -# define BKE_assert(a) \ +# define BLI_assert(a) \ do { \ if (0 == (a)) { \ fprintf(stderr, \ - "BKE_assert failed: %s, %d at \'%s\'\n", \ + "BLI_assert failed: %s, %d at \'%s\'\n", \ __FILE__, __LINE__, STRINGIFY(a)); \ _dummy_abort(); \ } \ } while (0) # endif #else -# define BKE_assert(a) (void)0 +# define BLI_assert(a) (void)0 #endif #endif // BLI_UTILDEFINES_H diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 7d2f8e0d32a..ff041c18b00 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -851,7 +851,7 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), /* sanity check */ if(w<=0 || h<=0 || w>2000 || h>2000) { printf("icon_draw_rect: icons are %i x %i pixels?\n", w, h); - BKE_assert(!"invalid icon size"); + BLI_assert(!"invalid icon size"); return; } diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 9c5f4067204..b2f74e435b1 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -981,7 +981,7 @@ void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3] dst_col[2]= src_col[2]>209?255:src_col[2]+46; break; default: - BKE_assert(!"invalid axis arg"); + BLI_assert(!"invalid axis arg"); } } diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index b4fe38b41ac..d69ba22585b 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -734,7 +734,7 @@ static void manipulator_setcolor(View3D *v3d, char axis, int colcode, unsigned c col[2]= 220; break; default: - BKE_assert(!"invalid axis arg"); + BLI_assert(!"invalid axis arg"); } } diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index d509efbb927..bf5beb05b06 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -3348,7 +3348,7 @@ static char *rna_idp_path(PointerRNA *ptr, IDProperty *haystack, IDProperty *nee IDProperty *iter; int i; - BKE_assert(haystack->type == IDP_GROUP); + BLI_assert(haystack->type == IDP_GROUP); link.up= parent_link; link.name= NULL; @@ -3408,7 +3408,7 @@ static char *rna_path_from_ID_to_idpgroup(PointerRNA *ptr) IDProperty *haystack; IDProperty *needle; - BKE_assert(ptr->id.data != NULL); + BLI_assert(ptr->id.data != NULL); RNA_id_pointer_create(ptr->id.data, &id_ptr); haystack= RNA_struct_idprops(&id_ptr, FALSE); diff --git a/source/blender/python/generic/mathutils_matrix.c b/source/blender/python/generic/mathutils_matrix.c index 4e33c312bf8..2418f746dd0 100644 --- a/source/blender/python/generic/mathutils_matrix.c +++ b/source/blender/python/generic/mathutils_matrix.c @@ -1516,7 +1516,7 @@ static PyObject *Matrix_mul(PyObject * m1, PyObject * m2) } } else { - BKE_assert(!"internal error"); + BLI_assert(!"internal error"); } PyErr_Format(PyExc_TypeError, "Matrix multiplication: not supported between '%.200s' and '%.200s' types", Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); diff --git a/source/blender/python/generic/mathutils_quat.c b/source/blender/python/generic/mathutils_quat.c index 1de249205b2..18eabcb77a1 100644 --- a/source/blender/python/generic/mathutils_quat.c +++ b/source/blender/python/generic/mathutils_quat.c @@ -684,7 +684,7 @@ static PyObject *Quaternion_mul(PyObject * q1, PyObject * q2) } } else { - BKE_assert(!"internal error"); + BLI_assert(!"internal error"); } PyErr_Format(PyExc_TypeError, "Quaternion multiplication: not supported between '%.200s' and '%.200s' types", Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); diff --git a/source/blender/python/generic/mathutils_vector.c b/source/blender/python/generic/mathutils_vector.c index d25bd12fdfd..cc9f9d32819 100644 --- a/source/blender/python/generic/mathutils_vector.c +++ b/source/blender/python/generic/mathutils_vector.c @@ -1129,7 +1129,7 @@ static PyObject *Vector_mul(PyObject * v1, PyObject * v2) } } else { - BKE_assert(!"internal error"); + BLI_assert(!"internal error"); } PyErr_Format(PyExc_TypeError, "Vector multiplication: not supported between '%.200s' and '%.200s' types", Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 3c76e1a703f..f2ba9f604be 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -269,7 +269,7 @@ void BPY_python_start( int argc, char **argv ) Py_DECREF(mod); } else { - BKE_assert(!"unable to load 'imp' module."); + BLI_assert(!"unable to load 'imp' module."); } } @@ -319,7 +319,7 @@ static int python_script_exec(bContext *C, const char *fn, struct Text *text, st PyObject *py_dict= NULL, *py_result= NULL; PyGILState_STATE gilstate; - BKE_assert(fn || text); + BLI_assert(fn || text); if (fn==NULL && text==NULL) { return 0; diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index c0c4227b466..10b029084c8 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -75,7 +75,7 @@ static int rna_id_write_error(PointerRNA *ptr, PyObject *key) else pyname= "<UNKNOWN>"; /* make a nice string error */ - BKE_assert(idtype != NULL); + BLI_assert(idtype != NULL); PyErr_Format(PyExc_RuntimeError, "Writing to ID classes in this context is not allowed: %.200s, %.200s datablock, error setting %.200s.%.200s", id->name+2, idtype, RNA_struct_identifier(ptr->type), pyname); return TRUE; @@ -1572,7 +1572,7 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, Po break; } default: - BKE_assert(!"Invalid array type"); + BLI_assert(!"Invalid array type"); PyErr_SetString(PyExc_TypeError, "not an array type"); Py_DECREF(tuple); @@ -2779,7 +2779,7 @@ static PyObject *pyrna_struct_getattro( BPy_StructRNA *self, PyObject *pyname ) break; default: /* should never happen */ - BKE_assert(!"Invalid context type"); + BLI_assert(!"Invalid context type"); PyErr_Format(PyExc_AttributeError, "bpy_struct: Context type invalid %d, can't get \"%.200s\" from context", newtype, name); ret= NULL; @@ -3400,7 +3400,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set) break; case PROP_RAW_UNSET: /* should never happen */ - BKE_assert(!"Invalid array type - set"); + BLI_assert(!"Invalid array type - set"); break; } @@ -3455,7 +3455,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set) break; case PROP_RAW_UNSET: /* should never happen */ - BKE_assert(!"Invalid array type - get"); + BLI_assert(!"Invalid array type - get"); break; } @@ -3813,7 +3813,7 @@ static PyObject * pyrna_func_call(PyObject *self, PyObject *args, PyObject *kw) void *retdata_single= NULL; /* Should never happen but it does in rare cases */ - BKE_assert(self_ptr != NULL); + BLI_assert(self_ptr != NULL); if(self_ptr==NULL) { PyErr_SetString(PyExc_RuntimeError, "rna functions internal rna pointer is NULL, this is a bug. aborting"); diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 518f7c4997a..0b88f0f42bf 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -341,7 +341,7 @@ void WM_read_file(bContext *C, const char *name, ReportList *reports) } else { BKE_reportf(reports, RPT_ERROR, "Unknown error loading: \"%s\".", name); - BKE_assert(!"invalid 'retval'"); + BLI_assert(!"invalid 'retval'"); } WM_cursor_wait(0); |