[QGIS Commit] r11545 - in trunk/qgis: python/core src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Sep 4 15:47:08 EDT 2009
Author: mhugent
Date: 2009-09-04 15:47:07 -0400 (Fri, 04 Sep 2009)
New Revision: 11545
Modified:
trunk/qgis/python/core/qgsrect.sip
trunk/qgis/src/core/qgsrectangle.cpp
trunk/qgis/src/core/qgsrectangle.h
Log:
Function argument can be const
Modified: trunk/qgis/python/core/qgsrect.sip
===================================================================
--- trunk/qgis/python/core/qgsrect.sip 2009-09-03 22:52:30 UTC (rev 11544)
+++ trunk/qgis/python/core/qgsrect.sip 2009-09-04 19:47:07 UTC (rev 11545)
@@ -58,7 +58,7 @@
//! Expand the rectangle to support zoom out scaling
void expand(double, const QgsPoint *c = 0);
//! return the intersection with the given rectangle
- QgsRectangle intersect(QgsRectangle *rect);
+ QgsRectangle intersect(const QgsRectangle *rect);
//! returns true when rectangle intersects with other rectangle
bool intersects(const QgsRectangle& rect) const;
//! return true when rectangle contains other rectangle
Modified: trunk/qgis/src/core/qgsrectangle.cpp
===================================================================
--- trunk/qgis/src/core/qgsrectangle.cpp 2009-09-03 22:52:30 UTC (rev 11544)
+++ trunk/qgis/src/core/qgsrectangle.cpp 2009-09-04 19:47:07 UTC (rev 11545)
@@ -129,7 +129,7 @@
ymax = centerY + newHeight;
}
-QgsRectangle QgsRectangle::intersect( QgsRectangle * rect ) const
+QgsRectangle QgsRectangle::intersect( const QgsRectangle * rect ) const
{
QgsRectangle intersection = QgsRectangle();
//If they don't actually intersect an empty QgsRectangle should be returned
Modified: trunk/qgis/src/core/qgsrectangle.h
===================================================================
--- trunk/qgis/src/core/qgsrectangle.h 2009-09-03 22:52:30 UTC (rev 11544)
+++ trunk/qgis/src/core/qgsrectangle.h 2009-09-04 19:47:07 UTC (rev 11545)
@@ -81,7 +81,7 @@
//! Expand the rectangle to support zoom out scaling
void expand( double, const QgsPoint *c = 0 );
//! return the intersection with the given rectangle
- QgsRectangle intersect( QgsRectangle *rect ) const;
+ QgsRectangle intersect( const QgsRectangle *rect ) const;
//! returns true when rectangle intersects with other rectangle
bool intersects( const QgsRectangle& rect ) const;
//! return true when rectangle contains other rectangle
More information about the QGIS-commit
mailing list