1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-25 16:04:23 +02:00

Code cleanup

This commit is contained in:
2015-11-25 23:58:46 +01:00
parent 5bd5b88be5
commit 0b4ee95591
17 changed files with 9 additions and 35 deletions

View File

@ -5,6 +5,8 @@
#include "poi.h"
#define BOUNDING_RECT_SIZE 0.01
bool POI::loadFile(const QString &fileName)
{
QFile file(fileName);
@ -64,7 +66,6 @@ static bool cb(const Entry* data, void* context)
return true;
}
#define RECT 0.01
QVector<Entry> POI::points(const QVector<QPointF> &path) const
{
QVector<Entry> ret;
@ -72,10 +73,10 @@ QVector<Entry> POI::points(const QVector<QPointF> &path) const
qreal min[2], max[2];
for (int i = 0; i < path.count(); i++) {
min[0] = path.at(i).x() - RECT;
min[1] = path.at(i).y() - RECT;
max[0] = path.at(i).x() + RECT;
max[1] = path.at(i).y() + RECT;
min[0] = path.at(i).x() - BOUNDING_RECT_SIZE;
min[1] = path.at(i).y() - BOUNDING_RECT_SIZE;
max[0] = path.at(i).x() + BOUNDING_RECT_SIZE;
max[1] = path.at(i).y() + BOUNDING_RECT_SIZE;
_tree.Search(min, max, cb, &set);
}