From c0a226b255d340a1a95d332ef15cdb4e2e9efc53 Mon Sep 17 00:00:00 2001 From: espie Date: Sun, 23 May 2010 17:50:56 +0000 Subject: [PATCH] fix build with g++4, which does have those isnan --- ...analysis_interpolation_qgsinterpolator_cpp | 27 ++++++++++--------- ...lysis_interpolation_qgstininterpolator_cpp | 25 +++++++++-------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/geo/qgis/patches/patch-src_analysis_interpolation_qgsinterpolator_cpp b/geo/qgis/patches/patch-src_analysis_interpolation_qgsinterpolator_cpp index 296009f3f34..7ce1d2f410f 100644 --- a/geo/qgis/patches/patch-src_analysis_interpolation_qgsinterpolator_cpp +++ b/geo/qgis/patches/patch-src_analysis_interpolation_qgsinterpolator_cpp @@ -1,12 +1,15 @@ -$OpenBSD: patch-src_analysis_interpolation_qgsinterpolator_cpp,v 1.1 2009/10/29 19:59:38 landry Exp $ ---- src/analysis/interpolation/qgsinterpolator.cpp.orig Tue Oct 27 20:45:47 2009 -+++ src/analysis/interpolation/qgsinterpolator.cpp Tue Oct 27 20:46:01 2009 -@@ -92,7 +92,7 @@ int QgsInterpolator::cacheBaseData() - continue; - } - attributeValue = att_it.value().toDouble( &attributeConversionOk ); -- if ( !attributeConversionOk || isnan( attributeValue ) ) //don't consider vertices with attributes like 'nan' for the interpolation -+ if ( !attributeConversionOk || __gnu_cxx::isnan( attributeValue ) ) //don't consider vertices with attributes like 'nan' for the interpolation - { - continue; - } +$OpenBSD: patch-src_analysis_interpolation_qgsinterpolator_cpp,v 1.2 2010/05/23 17:50:56 espie Exp $ +--- src/analysis/interpolation/qgsinterpolator.cpp.orig Sat Nov 28 18:07:29 2009 ++++ src/analysis/interpolation/qgsinterpolator.cpp Sun May 23 19:45:34 2010 +@@ -28,6 +28,11 @@ + #define isnan(f) _isnan(f) + #endif + ++#if __GNUC__ >= 4 ++using std::isnan; ++#else ++using __gnu_cxx::isnan; ++#endif + QgsInterpolator::QgsInterpolator( const QList& layerData ): mDataIsCached( false ), mLayerData( layerData ) + { + diff --git a/geo/qgis/patches/patch-src_analysis_interpolation_qgstininterpolator_cpp b/geo/qgis/patches/patch-src_analysis_interpolation_qgstininterpolator_cpp index 534ebbbf753..4818279011c 100644 --- a/geo/qgis/patches/patch-src_analysis_interpolation_qgstininterpolator_cpp +++ b/geo/qgis/patches/patch-src_analysis_interpolation_qgstininterpolator_cpp @@ -1,12 +1,15 @@ -$OpenBSD: patch-src_analysis_interpolation_qgstininterpolator_cpp,v 1.2 2010/01/11 20:13:31 landry Exp $ +$OpenBSD: patch-src_analysis_interpolation_qgstininterpolator_cpp,v 1.3 2010/05/23 17:50:56 espie Exp $ --- src/analysis/interpolation/qgstininterpolator.cpp.orig Sun Nov 22 15:41:00 2009 -+++ src/analysis/interpolation/qgstininterpolator.cpp Mon Jan 11 16:39:31 2010 -@@ -195,7 +195,7 @@ int QgsTINInterpolator::insertData( QgsFeature* f, boo - return 3; - } - attributeValue = att_it.value().toDouble( &attributeConversionOk ); -- if ( !attributeConversionOk || isnan( attributeValue ) ) //don't consider vertices with attributes like 'nan' for the interpolation -+ if ( !attributeConversionOk || __gnu_cxx::isnan( attributeValue ) ) //don't consider vertices with attributes like 'nan' for the interpolation - { - return 4; - } ++++ src/analysis/interpolation/qgstininterpolator.cpp Sun May 23 19:46:46 2010 +@@ -36,6 +36,11 @@ + #include + #define isnan(f) _isnan(f) + #endif ++#if __GNUC__ >= 4 ++using std::isnan; ++#else ++using __gnu_cxx::isnan; ++#endif + + QgsTINInterpolator::QgsTINInterpolator( const QList& inputData, TIN_INTERPOLATION interpolation, bool showProgressDialog ): QgsInterpolator( inputData ), mTriangulation( 0 ), \ + mTriangleInterpolator( 0 ), mIsInitialized( false ), mShowProgressDialog( showProgressDialog ), mExportTriangulationToFile( false ), mInterpolation( interpolation )