From 367427b26a268fd5727d63097184ee790fe55776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 13 Nov 2016 09:49:31 +0100 Subject: [PATCH] Code cleanup --- src/track.cpp | 2 +- src/track.h | 2 +- src/trackitem.cpp | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/track.cpp b/src/track.cpp index 42731b79..ef5c00e1 100644 --- a/src/track.cpp +++ b/src/track.cpp @@ -213,7 +213,7 @@ QDateTime Track::date() const return (_data.size()) ? _data.first().timestamp() : QDateTime(); } -Path Track::track() const +Path Track::path() const { Path ret; diff --git a/src/track.h b/src/track.h index 83cab5d5..06d93a48 100644 --- a/src/track.h +++ b/src/track.h @@ -14,7 +14,7 @@ class Track public: Track(const TrackData &data); - Path track() const; + Path path() const; Graph elevation() const; Graph speed() const; Graph heartRate() const; diff --git a/src/trackitem.cpp b/src/trackitem.cpp index e09fde74..42f0cb74 100644 --- a/src/trackitem.cpp +++ b/src/trackitem.cpp @@ -30,13 +30,13 @@ TrackItem::TrackItem(const Track &track, QGraphicsItem *parent) : PathItem(parent) { QPointF p; - QVector t = track.track(); - Q_ASSERT(t.count() >= 2); + const Path &path = track.path(); + Q_ASSERT(path.count() >= 2); - p = t.first().toMercator(); + p = path.first().toMercator(); _path.moveTo(QPointF(p.x(), -p.y())); - for (int i = 1; i < t.size(); i++) { - p = t.at(i).toMercator(); + for (int i = 1; i < path.size(); i++) { + p = path.at(i).toMercator(); _path.lineTo(QPointF(p.x(), -p.y())); }