Update of /cvsroot/opal/opal/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3692/src
Modified Files:
Blueprint.cpp Solid.cpp
Log Message:
Removed iterator from Solid::internal_applyForces to avoid assertions from VC++ 8.0 "Debug Iterator Support."
Index: Solid.cpp
===================================================================
RCS file: /cvsroot/opal/opal/src/Solid.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** Solid.cpp 21 Jul 2005 15:59:01 -0000 1.37
--- Solid.cpp 16 Aug 2005 19:01:11 -0000 1.38
***************
*** 228,260 ****
}
! std::vector<Force>::iterator forceIter;
! for (forceIter = mForceList.begin(); forceIter != mForceList.end();)
{
! if (true == (*forceIter).singleStep)
{
! (*forceIter).duration = stepSize;
}
! else if ((*forceIter).duration < stepSize)
{
// Scale the size of the force/torque.
! (*forceIter).vec *= ((*forceIter).duration / stepSize);
}
// Apply the actual force/torque.
! applyForce(*forceIter);
// The following is ok for all cases (even when duration is
// < mStepSize).
! (*forceIter).duration -= stepSize;
! if ((*forceIter).duration <= 0)
{
// Delete this force.
! (*forceIter) = mForceList.back();
mForceList.pop_back();
}
else
{
! ++forceIter;
}
}
--- 228,261 ----
}
! real invStepSize = 1 / stepSize;
!
! for (unsigned int i = 0; i < mForceList.size();)
{
! if (true == mForceList[i].singleStep)
{
! mForceList[i].duration = stepSize;
}
! else if (mForceList[i].duration < stepSize)
{
// Scale the size of the force/torque.
! mForceList[i].vec *= (mForceList[i].duration * invStepSize);
}
// Apply the actual force/torque.
! applyForce(mForceList[i]);
// The following is ok for all cases (even when duration is
// < mStepSize).
! mForceList[i].duration -= stepSize;
! if (mForceList[i].duration <= 0)
{
// Delete this force.
! mForceList[i] = mForceList.back();
mForceList.pop_back();
}
else
{
! ++i;
}
}
Index: Blueprint.cpp
===================================================================
RCS file: /cvsroot/opal/opal/src/Blueprint.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** Blueprint.cpp 18 Apr 2005 22:21:02 -0000 1.23
--- Blueprint.cpp 16 Aug 2005 19:01:11 -0000 1.24
***************
*** 90,96 ****
{
OPAL_LOGGER("warning") <<
! "opal::Blueprint::finalize: Invalid reference \
! in Joint " << data->name << ". Removing the Joint from the Blueprint."
! << std::endl;
delete data;
--- 90,96 ----
{
OPAL_LOGGER("warning") <<
! "opal::Blueprint::finalize: Invalid reference "
! << "in Joint " << data->name << ". Removing the Joint "
! << "from the Blueprint." << std::endl;
delete data;
|