Skip to content
Permalink
Browse files

fix warnings

git-svn-id: http://svn.osgeo.org/qgis/trunk@11387 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Aug 15, 2009
1 parent 831879d commit df8f8a6ae5bd7f2cb289019bd96d3f1b6b26244b
@@ -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
}

0 comments on commit df8f8a6

Please sign in to comment.
You can’t perform that action at this time.