wayou / box2d

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

compiler fixes: sign comparison warning, conversion to smaller int, non-c++ math functions (sinf, etc) #298

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I integrated box2d into our build system and ran it through a bunch of our 
supported platforms.  I thought I'd upload a patch of all my changes in case 
any are useful:

I switched all the non-c++ std library functions to std::, e.g. sinf -> 
std::sin, malloc -> std::malloc, etc.

I added an #if to stop it from including <windows.h> on xbox.  This is 
consistent with other open source projects like bullet.

I added some static_casts for int32 -> uint conversions, and changed one use of 
<climits> to <limits>.

It now compiles without warnings on a bunch of platforms, with -Wall (or 
equivalent) and none suppressed.

Original issue reported on code.google.com by corng...@gmail.com on 5 Nov 2012 at 3:13

Attachments:

GoogleCodeExporter commented 9 years ago
I reviewed the patch and instead made these changes:
- got rid of all the std namespace usage in Box2D.
- reverted all includes to the c-style, e.g. limits.h
- changed the Box2D Visual Studio warning level to 4.

Revision: 264

Original comment by erinca...@gmail.com on 27 Oct 2013 at 6:47