@@ -41,7 +41,7 @@ internal static void b2PrepareOverflowContacts(B2StepContext context)
4141 B2ContactSim [ ] contacts = color . contactSims . data ;
4242 B2BodyState [ ] awakeStates = context . states ;
4343
44- #if B2_ENABLE_VALIDATION
44+ #if DEBUG
4545 B2Body [ ] bodies = world . bodies . data ;
4646#endif
4747
@@ -63,7 +63,7 @@ internal static void b2PrepareOverflowContacts(B2StepContext context)
6363 int indexA = contactSim . bodySimIndexA ;
6464 int indexB = contactSim . bodySimIndexB ;
6565
66- #if B2_ENABLE_VALIDATION
66+ #if DEBUG
6767 B2Body bodyA = bodies [ contactSim . bodyIdA ] ;
6868 int validIndexA = bodyA . setIndex == ( int ) B2SolverSetType . b2_awakeSet ? bodyA . localIndex : B2_NULL_INDEX ;
6969 B2_ASSERT ( indexA == validIndexA ) ;
@@ -1249,7 +1249,7 @@ internal static void b2PrepareContactsTask(int startIndex, int endIndex, B2StepC
12491249 Span < B2ContactSim > contacts = context . contacts ;
12501250 Span < B2ContactConstraintWide > constraints = context . wideContactConstraints ;
12511251 B2BodyState [ ] awakeStates = context . states ;
1252- #if B2_ENABLE_VALIDATION
1252+ #if DEBUG
12531253 B2Body [ ] bodies = world . bodies . data ;
12541254#endif
12551255
@@ -1275,7 +1275,7 @@ internal static void b2PrepareContactsTask(int startIndex, int endIndex, B2StepC
12751275 int indexA = contactSim . bodySimIndexA ;
12761276 int indexB = contactSim . bodySimIndexB ;
12771277
1278- #if B2_ENABLE_VALIDATION
1278+ #if DEBUG
12791279 B2Body bodyA = bodies [ contactSim . bodyIdA ] ;
12801280 int validIndexA = bodyA . setIndex == ( int ) B2SolverSetType . b2_awakeSet ? bodyA . localIndex : B2_NULL_INDEX ;
12811281 B2Body bodyB = bodies [ contactSim . bodyIdB ] ;
0 commit comments