Commit: d0e6b59cd164110a54fa8cc2c95b6873f50e9605
Author: Hans Goudey
Date:   Mon Jun 28 15:21:14 2021 -0500
Branches: master
https://developer.blender.org/rBd0e6b59cd164110a54fa8cc2c95b6873f50e9605

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.

===================================================================

M       source/blender/blenkernel/intern/displist.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/displist.cc 
b/source/blender/blenkernel/intern/displist.cc
index 6a57c5ad5a2..757c86681e0 100644
--- a/source/blender/blenkernel/intern/displist.cc
+++ b/source/blender/blenkernel/intern/displist.cc
@@ -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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to