swordlegend / recastnavigation

Automatically exported from code.google.com/p/recastnavigation
zlib License
0 stars 0 forks source link

PS3 compiler error - casting from one numeric type to another #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In some of the code you have cast from one numeric type to another:

DetourNavMeshBuilder.cpp - line 497 (or there abouts)
dtl.vertCount = unsigned short(ndv-nv);

I believe this was to get around some compiler warnings that I raised. 
Although this code compiles fine on PC and Xbox360, the PS3 compiler doesn't 
like it. The problem is that it can't handle the space between "unsigned" and 
"short". I know...madness! You could change it to:

dtl.vertCount = uint16_t(ndv-nv);

Or use your own typedefs, static_cast or old style C cast.

Original issue reported on code.google.com by armstron...@gmail.com on 6 May 2010 at 1:52

GoogleCodeExporter commented 9 years ago
Mine looks like this, with brackets:

        dtl.vertCount = (unsigned short)(ndv-nv);

Are you using the latest from the SVN?

Original comment by memono...@gmail.com on 6 May 2010 at 2:12

GoogleCodeExporter commented 9 years ago
I did have a quick panic after posting that I might not have the latest. I will 
update. 
Sorry for wasting your time...

Original comment by armstron...@gmail.com on 6 May 2010 at 2:34

GoogleCodeExporter commented 9 years ago

Original comment by memono...@gmail.com on 7 May 2010 at 7:05