diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2012-04-24 18:33:44 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2012-04-24 18:33:44 +0400 |
commit | 0db3c5f74300980d35b3114992c299f072b913b1 (patch) | |
tree | 46cd6f52ac700ed09afc455944ca33e6e7e0d672 /extern/bullet2/src/LinearMath/btSerializer.h | |
parent | 4782522379b708f15bd5b045ca4193637c465979 (diff) |
Remove mingw-w64 errors from loss of precision by converting 64bit pointers to ints. All cases found were harmless and the error behaviour could be turned off by the -fpermissive flag but I'd rather keep that off to detect any real problems should they arise.
Diffstat (limited to 'extern/bullet2/src/LinearMath/btSerializer.h')
-rw-r--r-- | extern/bullet2/src/LinearMath/btSerializer.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/extern/bullet2/src/LinearMath/btSerializer.h b/extern/bullet2/src/LinearMath/btSerializer.h index 8a89374c612..a1e766c95ce 100644 --- a/extern/bullet2/src/LinearMath/btSerializer.h +++ b/extern/bullet2/src/LinearMath/btSerializer.h @@ -25,7 +25,14 @@ subject to the following restrictions: #endif #include <string.h> - +#if defined(_WIN64) +# ifdef __MINGW64__ +# include <basetsd.h> +# endif +typedef __int64 int_ptr; +#else +typedef long int_ptr; +#endif ///only the 32bit versions for now extern unsigned char sBulletDNAstr[]; @@ -247,7 +254,7 @@ protected: cp++; } { - nr= (long)cp; + nr= (int_ptr)cp; // long mask=3; nr= ((nr+3)&~3)-nr; while (nr--) @@ -282,7 +289,7 @@ protected: } { - nr= (long)cp; + nr= (int_ptr)cp; // long mask=3; nr= ((nr+3)&~3)-nr; while (nr--) |