Skip to content

Instantly share code, notes, and snippets.

@vo
Created March 26, 2011 22:04
Show Gist options
  • Save vo/888679 to your computer and use it in GitHub Desktop.
Save vo/888679 to your computer and use it in GitHub Desktop.
heisenbug!
// this works!
for (RigidBodyList::const_iterator i = rigid_bodies.begin(),
end = rigid_bodies.end(); i != end; ++i) {
1+1; // do nothing
checkCollision(target_body, *i);
}
// this does not work.
for (RigidBodyList::const_iterator i = rigid_bodies.begin(),
end = rigid_bodies.end(); i != end; ++i) {
checkCollision(target_body, *i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment