Skip to content

Commit

Permalink
mark method as const
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Oct 25, 2018
1 parent d1f0ae4 commit 5577d83
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/geometry/qgsrectangle.sip.in
Expand Up @@ -185,7 +185,7 @@ Scale the rectangle around its center point.
Scale the rectangle around its center point.
%End

QgsRectangle scaled( double scaleFactor, const QgsPointXY *center = 0 );
QgsRectangle scaled( double scaleFactor, const QgsPointXY *center = 0 ) const;
%Docstring
Scale the rectangle around its ``center`` point.

Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsrectangle.cpp
Expand Up @@ -58,7 +58,7 @@ QgsRectangle QgsRectangle::fromCenterAndSize( QgsPointXY center, double width, d
return QgsRectangle( xMin, yMin, xMax, yMax );
}

QgsRectangle QgsRectangle::scaled( double scaleFactor, const QgsPointXY *center )
QgsRectangle QgsRectangle::scaled( double scaleFactor, const QgsPointXY *center ) const
{
QgsRectangle scaledRect = QgsRectangle( *this );
scaledRect.scale( scaleFactor, center );
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsrectangle.h
Expand Up @@ -265,7 +265,7 @@ class CORE_EXPORT QgsRectangle
* Scale the rectangle around its \a center point.
* \since QGIS 3.4
*/
QgsRectangle scaled( double scaleFactor, const QgsPointXY *center = nullptr );
QgsRectangle scaled( double scaleFactor, const QgsPointXY *center = nullptr ) const;

/**
* Grows the rectangle in place by the specified amount.
Expand Down

0 comments on commit 5577d83

Please sign in to comment.