diff --git a/src/osgPlugins/flt/AttrData.h b/src/osgPlugins/flt/AttrData.h index 3ffef7c46..60387f629 100644 --- a/src/osgPlugins/flt/AttrData.h +++ b/src/osgPlugins/flt/AttrData.h @@ -26,7 +26,7 @@ namespace flt { - typedef signed long int32; + typedef signed int int32; class AttrData : public osg::Object { public: diff --git a/src/osgPlugins/flt/LocalVertexPoolRecord.cpp b/src/osgPlugins/flt/LocalVertexPoolRecord.cpp index b8c508331..8342197c1 100644 --- a/src/osgPlugins/flt/LocalVertexPoolRecord.cpp +++ b/src/osgPlugins/flt/LocalVertexPoolRecord.cpp @@ -369,7 +369,7 @@ void LocalVertexPoolRecord::endian() // If equal, vertex pool record was not continued. // If 16bit record length is less than length of vertex pool, then the original vertex // pool record was continued with one or more CONTINUATION_OP records. - assert ( pool->RecHeader._wLength <= ( ( (uint32) vertex ) - ( (uint32) pool ) ) ); + assert ( pool->RecHeader._wLength <= ( ( (unsigned long) vertex ) - ( (unsigned long) pool ) ) ); } diff --git a/src/osgPlugins/flt/ReaderWriterATTR.cpp b/src/osgPlugins/flt/ReaderWriterATTR.cpp index 8efd26f52..c4dbf09de 100644 --- a/src/osgPlugins/flt/ReaderWriterATTR.cpp +++ b/src/osgPlugins/flt/ReaderWriterATTR.cpp @@ -49,8 +49,8 @@ typedef signed char int8; typedef unsigned char uint8; typedef signed short int16; typedef unsigned short uint16; -typedef signed long int32; -typedef unsigned long uint32; +typedef signed int int32; +typedef unsigned int uint32; typedef float float32; typedef double float64; @@ -75,20 +75,20 @@ static void endian2(void* pSrc, int nSrc, void* pDst) } else if (nSrc == 4) { - long tmp1; - tmp1 = *(long *)pSrc; + uint32 tmp1; + tmp1 = *(uint32 *)pSrc; tmp1 = (tmp1 << 24) | ((tmp1 << 8) & 0xff0000) | ((tmp1 >> 8) & 0xff00) | ((tmp1 >> 24) & 0xff); - *(long *)pDst = tmp1; + *(uint32 *)pDst = tmp1; } else if (nSrc == 8) { - long tmp1, tmp2; - tmp1 = *(long *)pSrc; - tmp2 = *(1 + (long *)pSrc); + uint32 tmp1, tmp2; + tmp1 = *(uint32 *)pSrc; + tmp2 = *(1 + (uint32 *)pSrc); tmp1 = (tmp1 << 24) | ((tmp1 << 8) & 0xff0000) | ((tmp1 >> 8) & 0xff00) | ((tmp1 >> 24) & 0xff); tmp2 = (tmp2 << 24) | ((tmp2 << 8) & 0xff0000) | ((tmp2 >> 8) & 0xff00) | ((tmp2 >> 24) & 0xff); - *(long *)pDst = tmp2; - *(1 + (long *)pDst) = tmp1; + *(uint32 *)pDst = tmp2; + *(1 + (uint32 *)pDst) = tmp1; } } diff --git a/src/osgPlugins/flt/flt.cpp b/src/osgPlugins/flt/flt.cpp index d200792be..06f2380d6 100644 --- a/src/osgPlugins/flt/flt.cpp +++ b/src/osgPlugins/flt/flt.cpp @@ -25,20 +25,20 @@ void flt::endian2(void* pSrc, int nSrc, void* pDst, int ) } else if (nSrc == 4) { - long tmp1; - tmp1 = *(long *)pSrc; + uint32 tmp1; + tmp1 = *(uint32 *)pSrc; tmp1 = (tmp1 << 24) | ((tmp1 << 8) & 0xff0000) | ((tmp1 >> 8) & 0xff00) | ((tmp1 >> 24) & 0xff); - *(long *)pDst = tmp1; + *(uint32 *)pDst = tmp1; } else if (nSrc == 8) { - long tmp1, tmp2; - tmp1 = *(long *)pSrc; - tmp2 = *(1 + (long *)pSrc); + uint32 tmp1, tmp2; + tmp1 = *(uint32 *)pSrc; + tmp2 = *(1 + (uint32 *)pSrc); tmp1 = (tmp1 << 24) | ((tmp1 << 8) & 0xff0000) | ((tmp1 >> 8) & 0xff00) | ((tmp1 >> 24) & 0xff); tmp2 = (tmp2 << 24) | ((tmp2 << 8) & 0xff0000) | ((tmp2 >> 8) & 0xff00) | ((tmp2 >> 24) & 0xff); - *(long *)pDst = tmp2; - *(1 + (long *)pDst) = tmp1; + *(uint32 *)pDst = tmp2; + *(1 + (uint32 *)pDst) = tmp1; } } diff --git a/src/osgPlugins/flt/flt.h b/src/osgPlugins/flt/flt.h index f929bc377..30ce7f6ae 100644 --- a/src/osgPlugins/flt/flt.h +++ b/src/osgPlugins/flt/flt.h @@ -65,8 +65,8 @@ typedef signed char int8; typedef unsigned char uint8; typedef signed short int16; typedef unsigned short uint16; -typedef signed long int32; -typedef unsigned long uint32; +typedef signed int int32; +typedef unsigned int uint32; typedef float float32; typedef double float64;