From 4a9e5ca843eff7009052686b211e33aeca169bfc Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 1 Aug 2001 22:15:42 +0000 Subject: [PATCH] misunderstanding of reserve() --- panda/src/physics/baseIntegrator.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/panda/src/physics/baseIntegrator.cxx b/panda/src/physics/baseIntegrator.cxx index 3cee9069f1..65afaec560 100644 --- a/panda/src/physics/baseIntegrator.cxx +++ b/panda/src/physics/baseIntegrator.cxx @@ -60,7 +60,7 @@ precompute_linear_matrices(Physical *physical, // by local forces, we mean members of the physical's force set. int local_force_vec_size = physical->get_linear_forces().size(); - int index = 0, i; + int i; LMatrix4f current_xform; ForceNode *force_node; @@ -75,7 +75,7 @@ precompute_linear_matrices(Physical *physical, nassertv(force_node != (ForceNode *) NULL); get_rel_mat(physical_node, force_node, current_xform); - _precomputed_linear_matrices[index++] = current_xform; + _precomputed_linear_matrices.push_back(current_xform); } const pvector< PT(LinearForce) > &force_vector = @@ -87,7 +87,7 @@ precompute_linear_matrices(Physical *physical, nassertv(force_node != (ForceNode *) NULL); get_rel_mat(physical_node, force_node, current_xform); - _precomputed_linear_matrices[index++] = current_xform; + _precomputed_linear_matrices.push_back(current_xform); } } @@ -111,7 +111,7 @@ precompute_angular_matrices(Physical *physical, // by local forces, we mean members of the physical's force set. int local_force_vec_size = physical->get_angular_forces().size(); - int index = 0, i; + int i; LMatrix4f current_xform; ForceNode *force_node; @@ -126,7 +126,7 @@ precompute_angular_matrices(Physical *physical, nassertv(force_node != (ForceNode *) NULL); get_rel_mat(physical_node, force_node, current_xform); - _precomputed_angular_matrices[index++] = current_xform; + _precomputed_angular_matrices.push_back(current_xform); } const pvector< PT(AngularForce) > &force_vector = @@ -138,6 +138,6 @@ precompute_angular_matrices(Physical *physical, nassertv(force_node != (ForceNode *) NULL); get_rel_mat(physical_node, force_node, current_xform); - _precomputed_angular_matrices[index++] = current_xform; + _precomputed_angular_matrices.push_back(current_xform); } }