favreau / bullet

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

Add 'const' to universal constraint constructor params #571

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The anchor point and two axis parameters to the btUniversalConstraint 
constructor were references rather than const references. The constructor was 
actually normalizing the axes, which seems like an unwanted side effect. In the 
attached patch, I have added the 'const' declaration to the constructor params, 
and have changed the constructor code to normalize its member variable copies 
of the axes, rather than the parameters themselves. The patch was created 
against the 2.79 source.

The only conceivable downside of this change is that there might actually be 
code out there that depends on the btUniversalConstraint constructor 
normalizing the two axis parameters. Such code will need to be corrected after 
this patch is added.

Original issue reported on code.google.com by SkewMat...@gmail.com on 27 Nov 2011 at 5:05

Attachments:

GoogleCodeExporter commented 9 years ago
Good point, it has been fixed in latest trunk:
http://code.google.com/p/bullet/source/detail?r=2468

Thanks for the contribution

Original comment by erwin.coumans on 14 Dec 2011 at 9:10