diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2016-01-11 16:29:49 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-01-11 15:47:07 -0800 |
commit | 28f4e12725a51bc10e7605c526fc9ecf23dc5758 (patch) | |
tree | 770ff59b2a856945654b8b2f0593afe173e43f0f /subsurface-core | |
parent | 9f4bc61f620fda99c2cb4dad5e016b844f0669d3 (diff) | |
download | subsurface-28f4e12725a51bc10e7605c526fc9ecf23dc5758.tar.gz |
Simplify: remove variable tags
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core')
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 9 | ||||
-rw-r--r-- | 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; |