diff options
Diffstat (limited to 'glass.cpp')
-rw-r--r-- | glass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -139,7 +139,7 @@ template<unsigned D> class System { if (overlaps(p).empty()) { typename std::unordered_map<unsigned, Particle<D>>::iterator it; std::tie(it, std::ignore) = particles.insert({r.uniform((unsigned)0, (unsigned)pow(2, 28)), p}); - p.position.occupant = std::prev(particles.end()); + p.position.occupant = it; return true; } else { return false; |