Skip to content

Commit

Permalink
fix arm build again (followup 68fe5f5 and 1aff733)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 5, 2015
1 parent 83bb33c commit 05ae68f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/geometry/qgscircularstringv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,13 @@ void QgsCircularStringV2::transform( const QTransform& t )
int nPoints = numPoints();
for ( int i = 0; i < nPoints; ++i )
{
#ifdef QT_ARCH_ARM
qreal x, y;
t.map( mX[i], mY[i], &x, &y );
mX[i] = x; mY[i] = y;
#else
t.map( mX[i], mY[i], &mX[i], &mY[i] );
#endif
}
}

Expand Down
6 changes: 6 additions & 0 deletions src/core/geometry/qgspointv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,5 +241,11 @@ bool QgsPointV2::nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const

void QgsPointV2::transform( const QTransform& t )
{
#ifdef QT_ARCH_ARM
qreal x, y;
t.map( mX, mY, &x, &y );
mX = x; mY = y;
#else
t.map( mX, mY, &mX, &mY );
#endif
}
10 changes: 10 additions & 0 deletions src/core/geometry/qgswkbptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,20 @@ class CORE_EXPORT QgsWkbPtr
inline const QgsWkbPtr &operator>>( char &v ) const { memcpy( &v, mP, sizeof( v ) ); mP += sizeof( v ); return *this; }
inline const QgsWkbPtr &operator>>( QgsWKBTypes::Type &v ) const { memcpy( &v, mP, sizeof( v ) ); mP += sizeof( v ); return *this; }
inline const QgsWkbPtr &operator>>( QGis::WkbType &v ) const { memcpy( &v, mP, sizeof( v ) ); mP += sizeof( v ); return *this; }
#ifdef QT_ARCH_ARM
inline const QgsWkbPtr &operator>>( qreal &r ) const { double v; memcpy( &v, mP, sizeof( v ) ); mP += sizeof( v ); r = v; return *this; }
#endif

inline QgsWkbPtr &operator<<( const double &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
inline QgsWkbPtr &operator<<( const int &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
inline QgsWkbPtr &operator<<( const unsigned int &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
inline QgsWkbPtr &operator<<( const char &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
inline QgsWkbPtr &operator<<( const QgsWKBTypes::Type &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
inline QgsWkbPtr &operator<<( const QGis::WkbType &v ) { memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
#ifdef QT_ARCH_ARM
inline QgsWkbPtr &operator<<( const qreal &r ) { double v = r; memcpy( mP, &v, sizeof( v ) ); mP += sizeof( v ); return *this; }
#endif

inline void operator+=( int n ) { mP += n; }

inline operator unsigned char *() const { return mP; }
Expand All @@ -45,6 +52,9 @@ class CORE_EXPORT QgsConstWkbPtr
inline const QgsConstWkbPtr &operator>>( char &v ) const { read( v ); return *this; }
inline const QgsConstWkbPtr &operator>>( QGis::WkbType &v ) const { read( v ); return *this; }
inline const QgsConstWkbPtr &operator>>( QgsWKBTypes::Type &v ) const { read( v ); return *this; }
#ifdef QT_ARCH_ARM
inline const QgsConstWkbPtr &operator>>( qreal &r ) const { double v; read( v ); r = v; return *this; }
#endif

inline void operator+=( int n ) { mP += n; }
inline void operator-=( int n ) { mP -= n; }
Expand Down

0 comments on commit 05ae68f

Please sign in to comment.