erincatto / box2d

Box2D is a 2D physics engine for games
https://box2d.org
MIT License
8.05k stars 1.51k forks source link

Fix deprecated implicit copy operations (#711) #712

Closed HolyBlackCat closed 1 year ago

HolyBlackCat commented 2 years ago

Fixes #711

I went over all classes with custom destructors, and =deleted or =defaulted their copy operations. In cases where that would remove the default constructor, I added it back.

HolyBlackCat commented 2 years ago

Now that I'm thinking about it, this is a breaking change for those who copy a newly constructed b2World, like you did in tests (which is safe, unlike copying worlds with something inserted into them). I don't think this is a big deal, since there's a workaround (wraping one in unique_ptr or optional), so I wouldn't bother writing move ops.

erincatto commented 1 year ago

not accepting PRs, but I'll keep the issue open