mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
fix warnings
git-svn-id: http://svn.osgeo.org/qgis/trunk@11387 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
831879d7a7
commit
df8f8a6ae5
@ -216,7 +216,6 @@ int QgsCentralPointPositionManager::findObjectPosition( const unsigned char* wkb
|
||||
default:
|
||||
return 6;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int QgsCentralPointPositionManager::calculatePolygonCentroid( double x[], double y[], int numberOfPoints, double& centroidX, double& centroidY ) const
|
||||
|
@ -637,6 +637,7 @@ QgsPoint QgsMapRenderer::layerToMapCoordinates( QgsMapLayer* theLayer, QgsPoint
|
||||
}
|
||||
catch ( QgsCsException &cse )
|
||||
{
|
||||
Q_UNUSED( cse );
|
||||
QgsDebugMsg( QString( "Transform error caught:%s" ).arg( cse.what() ) );
|
||||
}
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ int QgsDiagramRenderer::calculateDiagramSize( const QgsFeature& f, int& size ) c
|
||||
return 0;
|
||||
}
|
||||
|
||||
int QgsDiagramRenderer::interpolateSize( double value, double lowerValue, double upperValue, \
|
||||
int QgsDiagramRenderer::interpolateSize( double value, double lowerValue, double upperValue,
|
||||
int lowerSize, int upperSize ) const
|
||||
{
|
||||
switch ( mItemInterpretation )
|
||||
@ -305,13 +305,9 @@ int QgsDiagramRenderer::interpolateSize( double value, double lowerValue, double
|
||||
return upperSize;
|
||||
}
|
||||
|
||||
QgsDiagramFactory::SizeType t;
|
||||
if ( mFactory )
|
||||
{
|
||||
t = mFactory->sizeType();
|
||||
}
|
||||
QgsDiagramFactory::SizeType t = mFactory ? mFactory->sizeType() : QgsDiagramFactory::HEIGHT;
|
||||
|
||||
if ( !mFactory || t == QgsDiagramFactory::HEIGHT )
|
||||
if ( t == QgsDiagramFactory::HEIGHT )
|
||||
{
|
||||
//do one dimensional linear interpolation
|
||||
return ( int )((( value - lowerValue ) * upperSize + ( upperValue - value ) * lowerSize ) / ( upperValue - lowerValue ) );
|
||||
@ -327,5 +323,4 @@ int QgsDiagramRenderer::interpolateSize( double value, double lowerValue, double
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
return 0; //something went wrong if we arrive here
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user