raulcesar / box2d

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

b2ChainShape.cpp results in unused variable when built in release #327

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In "b2ChainShape::CreateChain" the following:

b2Vec2 v1 = vertices[i-1];
b2Vec2 v2 = vertices[i];
// If the code crashes here, it means your vertices are too close together.
b2Assert(b2DistanceSquared(vertices[i-1], vertices[i]) > b2_linearSlop * 
b2_linearSlop);

... should be changed to ...

// If the code crashes here, it means your vertices are too close together.
b2Assert(b2DistanceSquared(vertices[i-1], vertices[i]) > b2_linearSlop * 
b2_linearSlop);

... or the whole loop omitted in a release build.

Original issue reported on code.google.com by melv....@gmail.com on 23 Jan 2014 at 10:47

GoogleCodeExporter commented 9 years ago
Completed: At revision: 305  

Fix for issue 327. Release warning fixed.

Original comment by erinca...@gmail.com on 5 Apr 2014 at 6:40