summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeocameratiles.cpp
diff options
context:
space:
mode:
authorAlex Wilson <alex.wilson@nokia.com>2012-05-14 18:37:19 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-15 07:39:12 +0200
commit285a52a7a02cdf18b95df56cd579c7910ec84949 (patch)
tree6cbf8eaf497f033a959b290e4378d10a6d7de591 /src/location/maps/qgeocameratiles.cpp
parent42ca2853c8c91a29899d5cb24c2e854f6c366a55 (diff)
downloadqtlocation-285a52a7a02cdf18b95df56cd579c7910ec84949.tar.gz
Coding style fixes: whitespace crusades
* Single spaces after keywords and before a bracket/brace * Binary operator spacing * Curlies at open of class/function body * Spacing around some type specifiers/declarations Change-Id: Ie516283e7a39c7ce83071ea8125774c76db611f5 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/location/maps/qgeocameratiles.cpp')
-rw-r--r--src/location/maps/qgeocameratiles.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/location/maps/qgeocameratiles.cpp b/src/location/maps/qgeocameratiles.cpp
index edef8392..9258661b 100644
--- a/src/location/maps/qgeocameratiles.cpp
+++ b/src/location/maps/qgeocameratiles.cpp
@@ -59,7 +59,8 @@
QT_BEGIN_NAMESPACE
-struct Frustum {
+struct Frustum
+{
QDoubleVector3D topLeftNear;
QDoubleVector3D topLeftFar;
QDoubleVector3D topRightNear;
@@ -72,7 +73,8 @@ struct Frustum {
typedef QVector<QDoubleVector3D> Polygon;
-class QGeoCameraTilesPrivate {
+class QGeoCameraTilesPrivate
+{
public:
QGeoCameraTilesPrivate();
~QGeoCameraTilesPrivate();
@@ -93,10 +95,12 @@ public:
Frustum frustum() const;
- class LengthSorter {
+ class LengthSorter
+ {
public:
QDoubleVector3D base;
- bool operator()(const QDoubleVector3D &lhs, const QDoubleVector3D &rhs) {
+ bool operator()(const QDoubleVector3D &lhs, const QDoubleVector3D &rhs)
+ {
return (lhs - base).lengthSquared() < (rhs - base).lengthSquared();
}
};
@@ -780,16 +784,16 @@ QSet<QGeoTileSpec> QGeoCameraTilesPrivate::tilesFromPolygon(const Polygon &polyg
map.add(x,y);
// top left corner
- int iPrev = (i1 + numPoints - 1 ) % numPoints;
+ int iPrev = (i1 + numPoints - 1) % numPoints;
double xPrevious = polygon.at(iPrev).get(0);
double yPrevious = polygon.at(iPrev).get(1);
bool xPreviousFixed = qFuzzyCompare(xPrevious, x1);
- if ( xIntegral && xPreviousFixed && yIntegral && yFixed){
- if ( (x2 > x1) && (yPrevious > y1) ){
- if ( (x-1) > 0 && (y-1) > 0)
- map.add(x-1,y-1);
- }
- else if ( (x2 < x1) && (yPrevious < y1) ){
+ if (xIntegral && xPreviousFixed && yIntegral && yFixed) {
+ if ((x2 > x1) && (yPrevious > y1)) {
+ if ((x - 1) > 0 && (y - 1) > 0)
+ map.add(x - 1, y - 1);
+ } else if ((x2 < x1) && (yPrevious < y1)) {
+ // what?
}
}