Cleanup: Replace paranoid check with assert

Every call to `BKE_displist_make_curveTypes` already checks the object
type beforehand, there is no need to check it again. Also removed an
outdated comment.
This commit is contained in:
2021-06-28 15:21:14 -05:00
parent d2e473a2dd
commit d0e6b59cd1

View File

@@ -1641,12 +1641,7 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph,
Object *ob,
const bool for_render)
{
/* The same check for duplis as in do_makeDispListCurveTypes.
* Happens when curve used for constraint/bevel was converted to mesh.
* check there is still needed for render displist and orco displists. */
if (!ELEM(ob->type, OB_SURF, OB_CURVE, OB_FONT)) {
return;
}
BLI_assert(ELEM(ob->type, OB_SURF, OB_CURVE, OB_FONT));
BKE_object_free_derived_caches(ob);