Stop timer on previously missed return path.

For these cases, it might be helpful to have a scoped wrapper object
that calls start in the constructor and stop in the destructor.


git-svn-id: https://subversion.assembla.com/svn/qmcdev/trunk@7124 e5b18d87-469d-4833-9cc0-8cdfa06e9491
This commit is contained in:
Mark Dewing 2016-09-21 04:15:14 +00:00
parent c17e7ffa0f
commit 7fbb96c7a2
1 changed files with 3 additions and 0 deletions

View File

@ -517,7 +517,10 @@ ParticleSet::makeMoveAndCheck(Index_t iat, const SingleParticlePos_t& displ)
if (UseBoundBox)
{
if (Lattice.outOfBound(Lattice.toUnit(displ)))
{
myTimers[0]->stop();
return false;
}
activePos=R[iat]; //save the current position
SingleParticlePos_t newpos(activePos+displ);
newRedPos=Lattice.toUnit(newpos);