From c3baff5194de08db4b91d7448fdd53a64ff4eec9 Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Wed, 11 Jun 2003 02:29:12 +0000 Subject: [PATCH] optimization: preincrement iterator --- panda/src/physics/angularEulerIntegrator.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/panda/src/physics/angularEulerIntegrator.cxx b/panda/src/physics/angularEulerIntegrator.cxx index 8c53214192..9237a35e60 100644 --- a/panda/src/physics/angularEulerIntegrator.cxx +++ b/panda/src/physics/angularEulerIntegrator.cxx @@ -69,8 +69,7 @@ child_integrate(Physical *physical, current_object_iter = physical->get_object_vector().begin(); for (; current_object_iter != physical->get_object_vector().end(); - current_object_iter++) { - + ++current_object_iter) { PhysicsObject *current_object = *current_object_iter; // bail out if this object doesn't exist or doesn't want to be @@ -92,7 +91,7 @@ child_integrate(Physical *physical, // global forces f_cur = forces.begin(); int index = 0; - for (; f_cur != forces.end(); f_cur++) { + for (; f_cur != forces.end(); ++f_cur) { AngularForce *cur_force = *f_cur; // make sure the force is turned on. @@ -110,7 +109,7 @@ child_integrate(Physical *physical, // local forces f_cur = physical->get_angular_forces().begin(); - for (; f_cur != physical->get_angular_forces().end(); f_cur++) { + for (; f_cur != physical->get_angular_forces().end(); ++f_cur) { AngularForce *cur_force = *f_cur; // make sure the force is turned on.