Skip to content

Commit 9bffb8a

Browse files
author
g_j_m
committed
Misc. tidy up.
git-svn-id: http://svn.osgeo.org/qgis/trunk@5290 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 870c61a commit 9bffb8a

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/core/qgsrect.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#ifdef WIN32
2323
#include <limits>
2424
#endif
25-
#include <qstring.h>
26-
#include <qtextstream.h>
25+
#include <QString>
26+
#include <QTextStream>
2727

2828
#include "qgspoint.h"
2929
#include "qgsrect.h"
@@ -86,7 +86,7 @@ void QgsRect::setMinimal()
8686
ymax =-std::numeric_limits<double>::max();
8787
}
8888

89-
void QgsRect::scale(double scaleFactor, QgsPoint * cp)
89+
void QgsRect::scale(double scaleFactor, const QgsPoint * cp)
9090
{
9191
// scale from the center
9292
double centerX, centerY;
@@ -107,7 +107,7 @@ void QgsRect::scale(double scaleFactor, QgsPoint * cp)
107107
ymax = centerY + newHeight / 2.0;
108108
}
109109

110-
void QgsRect::expand(double scaleFactor, QgsPoint * cp)
110+
void QgsRect::expand(double scaleFactor, const QgsPoint * cp)
111111
{
112112
// scale from the center
113113
double centerX, centerY;

src/core/qgsrect.h

+3-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121

2222
#include <iosfwd>
2323

24-
#ifndef QSTRING_H
25-
#include <qstring.h>
26-
#endif
24+
class QString;
2725

2826
#include "qgspoint.h"
2927

@@ -79,9 +77,9 @@ class QgsRect
7977
//! Center point of the rectangle
8078
QgsPoint center() const;
8179
//! Scale the rectangle around its center point
82-
void scale(double, QgsPoint *c =0);
80+
void scale(double, const QgsPoint *c =0);
8381
//! Expand the rectangle to support zoom out scaling
84-
void expand(double, QgsPoint *c = 0);
82+
void expand(double, const QgsPoint *c = 0);
8583
//! return the intersection with the given rectangle
8684
QgsRect intersect(QgsRect *rect);
8785
//! expand the rectangle so that covers both the original rectangle and the given rectangle

0 commit comments

Comments
 (0)