Skip to content

Commit b6d8331

Browse files
committedJun 13, 2014
fix windows build
1 parent 5d1eb4e commit b6d8331

File tree

5 files changed

+15
-26
lines changed

5 files changed

+15
-26
lines changed
 

‎CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ IF (PEDANTIC)
311311
ADD_DEFINITIONS( /wd4100 ) # unused formal parameters
312312
ADD_DEFINITIONS( /wd4127 ) # constant conditional expressions (used in Qt template classes)
313313
ADD_DEFINITIONS( /wd4231 ) # nonstandard extension used : 'identifier' before template explicit instantiation (used in Qt template classes)
314+
ADD_DEFINITIONS( /wd4244 ) # conversion from '...' to '...' possible loss of data
314315
ADD_DEFINITIONS( /wd4251 ) # needs to have dll-interface to be used by clients of class (occurs in Qt template classes)
315316
ADD_DEFINITIONS( /wd4275 ) # non dll-interface class '...' used as base for dll-interface class '...'
316317
ADD_DEFINITIONS( /wd4505 ) # unreferenced local function has been removed (QgsRasterDataProvider::extent)

‎python/core/qgsgeometry.sip

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -440,14 +440,11 @@ class QgsGeometry
440440
* @note python binding added in 1.6
441441
**/
442442
void validateGeometry( QList<QgsGeometry::Error> &errors /Out/ );
443+
444+
/** compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
445+
@param geometryList a list of QgsGeometry* as input
446+
@returns the new computed QgsGeometry, or null
447+
*/
448+
static QgsGeometry *unaryUnion( const QList<QgsGeometry*>& geometryList ) /Factory/;
443449
}; // class QgsGeometry
444450

445-
/** namespace where QgsGeometry-based algorithms lie */
446-
namespace QgsGeometryAlgorithms
447-
{
448-
/** compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
449-
@param geometryList a list of QgsGeometry* as input
450-
@returns the new computed QgsGeometry, or null
451-
*/
452-
QgsGeometry* unaryUnion( const QList<QgsGeometry*>& geometryList );
453-
};

‎src/core/qgsgeometry.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6397,10 +6397,7 @@ QgsGeometry* QgsGeometry::convertToPolygon( bool destMultipart )
63976397
}
63986398
}
63996399

6400-
namespace QgsGeometryAlgorithms
6401-
{
6402-
6403-
QgsGeometry* unaryUnion( const QList<QgsGeometry*>& geometryList )
6400+
QgsGeometry *QgsGeometry::unaryUnion( const QList<QgsGeometry*> &geometryList )
64046401
{
64056402
QList<GEOSGeometry*> geoms;
64066403
foreach( QgsGeometry* g, geometryList )
@@ -6414,5 +6411,3 @@ QgsGeometry* unaryUnion( const QList<QgsGeometry*>& geometryList )
64146411
ret->fromGeos( unioned );
64156412
return ret;
64166413
}
6417-
6418-
}// QgsGeometryAlgorithms

‎src/core/qgsgeometry.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,12 @@ class CORE_EXPORT QgsGeometry
486486
**/
487487
void validateGeometry( QList<Error> &errors );
488488

489+
/** compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
490+
@param geometryList a list of QgsGeometry* as input
491+
@returns the new computed QgsGeometry, or null
492+
*/
493+
static QgsGeometry *unaryUnion( const QList<QgsGeometry*>& geometryList );
494+
489495
private:
490496
// Private variables
491497

@@ -679,14 +685,4 @@ class CORE_EXPORT QgsConstWkbPtr
679685
inline operator const unsigned char *() const { return mP; }
680686
};
681687

682-
/** namespace where QgsGeometry-based algorithms lie */
683-
namespace QgsGeometryAlgorithms
684-
{
685-
/** compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
686-
@param geometryList a list of QgsGeometry* as input
687-
@returns the new computed QgsGeometry, or null
688-
*/
689-
QgsGeometry* unaryUnion( const QList<QgsGeometry*>& geometryList );
690-
}
691-
692688
#endif

‎src/core/symbology-ng/qgsinvertedpolygonrenderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ void QgsInvertedPolygonRenderer::stopRender( QgsRenderContext& context )
224224
if ( mPreprocessingEnabled )
225225
{
226226
// compute the unary union on the polygons
227-
QScopedPointer<QgsGeometry> unioned( QgsGeometryAlgorithms::unaryUnion( cit->geometries ) );
227+
QScopedPointer<QgsGeometry> unioned( QgsGeometry::unaryUnion( cit->geometries ) );
228228
// compute the difference with the extent
229229
QScopedPointer<QgsGeometry> rect( QgsGeometry::fromPolygon( mExtentPolygon ) );
230230
QgsGeometry *final = rect->difference( const_cast<QgsGeometry*>(unioned.data()) );

0 commit comments

Comments
 (0)
Please sign in to comment.