KenzieMac130 / ogre-procedural

Automatically exported from code.google.com/p/ogre-procedural
0 stars 0 forks source link

Use concrete int types from cstdint to avoid trouble when porting to other architectures #93

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently this library relies on "unsigned int" and the like to all be the same 
sizes everywhere. This is not actually the case and may lead to unexpected bugs 
when compiling on other architectures. I suggest using uint32_t and friends 
from <cstdint> everywhere to remedy this.

Original issue reported on code.google.com by svenst...@gmail.com on 20 Nov 2011 at 6:55

GoogleCodeExporter commented 8 years ago
Visual Studio doesn't ship with that header, from what I read over the 
Internet, so a solution would be to define a custom uint32 (I think that's what 
Ogre does).
In many cases, however, unsigned int is just used to iterate over an array and 
such, having a variable size across platform isn't an issue in that case.
The only case where I think uint32 and such would be useful (but correct me if 
I'm wrong) is when reinterpreting void* raw data, such as when locking a 
hardware buffer or (de)serialising to/from a file.

Original comment by michael.broutin@gmail.com on 22 Nov 2011 at 7:58

GoogleCodeExporter commented 8 years ago

Original comment by michael.broutin@gmail.com on 6 Mar 2012 at 9:24

GoogleCodeExporter commented 8 years ago

Original comment by michael.broutin@gmail.com on 29 Mar 2012 at 3:38

GoogleCodeExporter commented 8 years ago

Original comment by michael.broutin@gmail.com on 29 Mar 2012 at 4:24

GoogleCodeExporter commented 8 years ago

Original comment by michael.broutin@gmail.com on 26 Oct 2012 at 5:17