owashe / box2d

Automatically exported from code.google.com/p/box2d
0 stars 0 forks source link

[Request] make b2World::DrawDebugData const #317

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The b2World::DrawDebugData method should be made const, because drawing 
something should never modify anything. It would also be compatible with SFMLs 
const draw() method specified in the sf::Drawable interface.

Also the DrawShape method and the DrawJoint method must also be made const. In 
line 1201 in b2World.cpp, there is a pointer to a b2BroadPhase. This pointer 
also needs to be const. 

 - patrick246

Original issue reported on code.google.com by patricks...@gmx.net on 3 Oct 2013 at 5:04

GoogleCodeExporter commented 8 years ago
This was intentional. A user implementation of b2Draw may have state. I know 
about mutable and prefer not to use it.

Original comment by erinca...@gmail.com on 29 Oct 2013 at 4:04