From 28f4e12725a51bc10e7605c526fc9ecf23dc5758 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 11 Jan 2016 16:29:49 -0200 Subject: Simplify: remove variable tags Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 9 +++------ subsurface-core/subsurface-qt/DiveObjectHelper.h | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp index e39ba2fbb..a947ea4e3 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp @@ -36,11 +36,6 @@ static QString getFormattedCylinder(struct dive *dive, unsigned int idx) DiveObjectHelper::DiveObjectHelper(struct dive *d) : m_dive(d) { - char buffer[256]; - taglist_get_tagstring(d->tag_list, buffer, 256); - m_tags = QString(buffer); - - int added = 0; QString gas, gases; for (int i = 0; i < MAX_CYLINDERS; i++) { @@ -169,7 +164,9 @@ QString DiveObjectHelper::notes() const QString DiveObjectHelper::tags() const { - return m_tags; + static char buffer[256]; + taglist_get_tagstring(m_dive->tag_list, buffer, 256); + return QString(buffer); } QString DiveObjectHelper::gas() const diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.h b/subsurface-core/subsurface-qt/DiveObjectHelper.h index c5fddbb3d..ba1a02236 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.h +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.h @@ -64,7 +64,6 @@ public: private: QString m_date; QString m_time; - QString m_tags; QString m_gas; QStringList m_weights; QStringList m_cylinders; -- cgit v1.2.3-70-g09d2