summaryrefslogtreecommitdiffstats
path: root/subsurface-core
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2016-01-11 16:29:49 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-11 15:47:07 -0800
commit28f4e12725a51bc10e7605c526fc9ecf23dc5758 (patch)
tree770ff59b2a856945654b8b2f0593afe173e43f0f /subsurface-core
parent9f4bc61f620fda99c2cb4dad5e016b844f0669d3 (diff)
downloadsubsurface-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.cpp9
-rw-r--r--subsurface-core/subsurface-qt/DiveObjectHelper.h1
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;