Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@11387 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 15, 2009
1 parent 831879d commit df8f8a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/core/qgscentralpointpositionmanager.cpp
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsmaprenderer.cpp
Expand Up @@ -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() ) );
}
}
Expand Down
11 changes: 3 additions & 8 deletions src/plugins/diagram_overlay/qgsdiagramrenderer.cpp
Expand Up @@ -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 )
Expand All @@ -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 ) );
Expand All @@ -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.