code-google-com / bullet

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

[PATCH] Fix M_PI redefinition warning in ConstraintDemo.cpp #268

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
M_PI is unconditionally redefined in ConstraintDemo.cpp causing a warning
on GCC compilers.

Patch is against bullet-2.75-rc7

FYI, there is also _USE_MATH_DEFINES which people may want to define
instead of all of this definition of M_PI, M_PI_2, and M_PI_4 throughout
the code

#define _USE_MATH_DEFINES
#include <cmath>

See.
http://msdn.microsoft.com/en-us/library/4hwaceh6%28VS.80%29.aspx

Original issue reported on code.google.com by philiplo...@gmail.com on 17 Aug 2009 at 2:55

Attachments:

GoogleCodeExporter commented 9 years ago
demos need cleanup indeed, and use SIMD_PI etc, as defined in 
Bullet/src/LinearMath/btScalar.h

We'll look into it.

Original comment by erwin.coumans on 3 Nov 2009 at 7:27

GoogleCodeExporter commented 9 years ago
It has been fixed in latest trunk:
http://code.google.com/p/bullet/source/detail?r=1864

Thanks for the report!

Original comment by erwin.coumans on 21 Dec 2009 at 11:55