read_error = true ;
}
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int*)var);
+ sgEndianSwap( (uint32_t *)var);
}
}
void sgWriteFloat ( gzFile fd, const float var )
{
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int*)&var);
+ sgEndianSwap( (uint32_t *)&var);
}
if ( gzwrite ( fd, (void *)(&var), sizeof(float) ) != sizeof(float) ) {
write_error = true ;
read_error = true ;
}
if ( sgIsBigEndian() ) {
- sgEndianSwap( (uint64_t*)var);
+ sgEndianSwap( (uint64_t *)var);
}
}
void sgWriteDouble ( gzFile fd, const double var )
{
if ( sgIsBigEndian() ) {
- sgEndianSwap( (uint64_t*)&var);
+ sgEndianSwap( (uint64_t *)&var);
}
if ( gzwrite ( fd, (void *)(&var), sizeof(double) ) != sizeof(double) ) {
write_error = true ;
read_error = true ;
}
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int*)var);
+ sgEndianSwap( (uint32_t *)var);
}
}
void sgWriteUInt ( gzFile fd, const unsigned int var )
{
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int*)&var);
+ sgEndianSwap( (uint32_t *)&var);
}
if ( gzwrite ( fd, (void *)(&var), sizeof(unsigned int) )
!= sizeof(unsigned int) )
read_error = true ;
}
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int*)var);
+ sgEndianSwap( (uint32_t *)var);
}
}
void sgWriteInt ( gzFile fd, const int var )
{
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int*)&var);
+ sgEndianSwap( (uint32_t *)&var);
}
if ( gzwrite ( fd, (void *)(&var), sizeof(int) ) != sizeof(int) ) {
write_error = true ;
read_error = true ;
}
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int*)var);
+ sgEndianSwap( (uint32_t *)var);
}
}
void sgWriteLong ( gzFile fd, const int32_t var )
{
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int*)&var);
+ sgEndianSwap( (uint32_t *)&var);
}
if ( gzwrite ( fd, (void *)(&var), sizeof(int32_t) )
!= sizeof(int32_t) )
read_error = true ;
}
if ( sgIsBigEndian() ) {
- sgEndianSwap( (uint64_t*)var);
+ sgEndianSwap( (uint64_t *)var);
}
}
void sgWriteLongLong ( gzFile fd, const int64_t var )
{
if ( sgIsBigEndian() ) {
- sgEndianSwap( (uint64_t*)&var);
+ sgEndianSwap( (uint64_t *)&var);
}
if ( gzwrite ( fd, (void *)(&var), sizeof(int64_t) )
!= sizeof(int64_t) )
read_error = true ;
}
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned short int*)var);
+ sgEndianSwap( (uint16_t *)var);
}
}
void sgWriteUShort ( gzFile fd, const unsigned short var )
{
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned short*)&var);
+ sgEndianSwap( (uint16_t *)&var);
}
if ( gzwrite ( fd, (void *)(&var), sizeof(unsigned short) )
!= sizeof(unsigned short) )
read_error = true ;
}
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned short int*)var);
+ sgEndianSwap( (uint16_t *)var);
}
}
void sgWriteShort ( gzFile fd, const short var )
{
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned short*)&var);
+ sgEndianSwap( (uint16_t *)&var);
}
if ( gzwrite ( fd, (void *)(&var), sizeof(short) ) != sizeof(short) ) {
write_error = true ;
}
if ( sgIsBigEndian() ) {
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (unsigned int*)var++);
+ sgEndianSwap( (uint32_t *)var++);
}
}
}
float *ptr = swab;
memcpy( swab, var, sizeof(float) * n );
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (unsigned int*)ptr++);
+ sgEndianSwap( (uint32_t *)ptr++);
}
var = swab;
}
}
if ( sgIsBigEndian() ) {
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (uint64_t*)var++);
+ sgEndianSwap( (uint64_t *)var++);
}
}
}
double *ptr = swab;
memcpy( swab, var, sizeof(double) * n );
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (uint64_t*)ptr++);
+ sgEndianSwap( (uint64_t *)ptr++);
}
var = swab;
}
}
if ( sgIsBigEndian() ) {
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (unsigned short int*)var++);
+ sgEndianSwap( (uint16_t *)var++);
}
}
}
unsigned short *ptr = swab;
memcpy( swab, var, sizeof(unsigned short) * n );
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (unsigned short*)ptr++);
+ sgEndianSwap( (uint16_t *)ptr++);
}
var = swab;
}
}
if ( sgIsBigEndian() ) {
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (unsigned short int*)var++);
+ sgEndianSwap( (uint16_t *)var++);
}
}
}
short *ptr = swab;
memcpy( swab, var, sizeof(short) * n );
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (unsigned short*)ptr++);
+ sgEndianSwap( (uint16_t *)ptr++);
}
var = swab;
}
}
if ( sgIsBigEndian() ) {
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (unsigned int*)var++);
+ sgEndianSwap( (uint32_t *)var++);
}
}
}
unsigned int *ptr = swab;
memcpy( swab, var, sizeof(unsigned int) * n );
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (unsigned int*)ptr++);
+ sgEndianSwap( (uint32_t *)ptr++);
}
var = swab;
}
}
if ( sgIsBigEndian() ) {
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (unsigned int*)var++);
+ sgEndianSwap( (uint32_t *)var++);
}
}
}
int *ptr = swab;
memcpy( swab, var, sizeof(int) * n );
for ( unsigned int i = 0; i < n; ++i ) {
- sgEndianSwap( (unsigned int*)ptr++);
+ sgEndianSwap( (uint32_t *)ptr++);
}
var = swab;
}
for ( k = 0; k < count; ++k ) {
if ( sgIsBigEndian() ) {
for ( idx = 0; idx < idx_size; ++idx ) {
- sgEndianSwap( (unsigned short *)&(sptr[idx]) );
+ sgEndianSwap( (uint16_t *)&(sptr[idx]) );
}
}
idx = 0;
float *fptr = (float *)ptr;
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int *)fptr );
+ sgEndianSwap( (uint32_t *)fptr );
}
gbs_radius = fptr[0];
// cout << "Bounding radius = " << gbs_radius << endl;
wgs84_nodes.reserve( count );
for ( k = 0; k < count; ++k ) {
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int *)&(fptr[0]) );
- sgEndianSwap( (unsigned int *)&(fptr[1]) );
- sgEndianSwap( (unsigned int *)&(fptr[2]) );
+ sgEndianSwap( (uint32_t *)&(fptr[0]) );
+ sgEndianSwap( (uint32_t *)&(fptr[1]) );
+ sgEndianSwap( (uint32_t *)&(fptr[2]) );
}
wgs84_nodes.push_back( Point3D(fptr[0], fptr[1], fptr[2]) );
fptr += 3;
colors.reserve(count);
for ( k = 0; k < count; ++k ) {
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int *)&(fptr[0]) );
- sgEndianSwap( (unsigned int *)&(fptr[1]) );
- sgEndianSwap( (unsigned int *)&(fptr[2]) );
- sgEndianSwap( (unsigned int *)&(fptr[3]) );
+ sgEndianSwap( (uint32_t *)&(fptr[0]) );
+ sgEndianSwap( (uint32_t *)&(fptr[1]) );
+ sgEndianSwap( (uint32_t *)&(fptr[2]) );
+ sgEndianSwap( (uint32_t *)&(fptr[3]) );
}
colors.push_back( Point3D( fptr[0], fptr[1], fptr[2] ) );
fptr += 4;
texcoords.reserve(count);
for ( k = 0; k < count; ++k ) {
if ( sgIsBigEndian() ) {
- sgEndianSwap( (unsigned int *)&(fptr[0]) );
- sgEndianSwap( (unsigned int *)&(fptr[1]) );
+ sgEndianSwap( (uint32_t *)&(fptr[0]) );
+ sgEndianSwap( (uint32_t *)&(fptr[1]) );
}
texcoords.push_back( Point3D( fptr[0], fptr[1], 0 ) );
fptr += 2;