David Rose vor 20 Jahren
Ursprung
Commit
988792a85d
2 geänderte Dateien mit 7 neuen und 0 gelöschten Zeilen
  1. 4 0
      dtool/Config.pp
  2. 3 0
      dtool/LocalSetup.pp

+ 4 - 0
dtool/Config.pp

@@ -520,6 +520,10 @@
 // possible.
 #defer DO_PSTATS $[or $[and $[HAVE_NET],$[< $[OPTIMIZE], 4]], $[DO_PSTATS]]
 
+// Do you want to type-check downcasts?  This is a good idea during
+// development, but does impose some run-time overhead.
+#defer DO_DCAST $[< $[OPTIMIZE], 4]
+
 // Do you want to build the debugging tools for recording and
 // visualizing intersection tests by the collision system?  Enabling
 // this increases runtime collision overhead just a tiny bit.

+ 3 - 0
dtool/LocalSetup.pp

@@ -210,6 +210,9 @@ $[cdefine HAVE_BISON]
 /* Define if we want to use PStats.  */
 $[cdefine DO_PSTATS]
 
+/* Define if we want to type-check downcasts.  */
+$[cdefine DO_DCAST]
+
 /* Define if we want to provide collision system recording and
    visualization tools. */
 $[cdefine DO_COLLISION_RECORDING]