diff options
-rw-r--r-- | core/divecomputer.cpp | 11 | ||||
-rw-r--r-- | core/divecomputer.h | 5 |
2 files changed, 1 insertions, 15 deletions
diff --git a/core/divecomputer.cpp b/core/divecomputer.cpp index 784add1d9..79edfc494 100644 --- a/core/divecomputer.cpp +++ b/core/divecomputer.cpp @@ -5,14 +5,6 @@ DiveComputerList dcList; -DiveComputerList::DiveComputerList() -{ -} - -DiveComputerList::~DiveComputerList() -{ -} - bool DiveComputerNode::operator==(const DiveComputerNode &a) const { return model == a.model && @@ -89,8 +81,7 @@ void DiveComputerList::addDC(QString m, uint32_t d, QString n, QString s, QStrin dcMap.remove(m, *existNode); } - DiveComputerNode newNode(m, d, s, f, n); - dcMap.insert(m, newNode); + dcMap.insert(m, { m, d, s, f, n }); } extern "C" void create_device_node(const char *model, uint32_t deviceid, const char *serial, const char *firmware, const char *nickname) diff --git a/core/divecomputer.h b/core/divecomputer.h index d58b22b68..dd82ce241 100644 --- a/core/divecomputer.h +++ b/core/divecomputer.h @@ -8,8 +8,6 @@ class DiveComputerNode { public: - DiveComputerNode(QString m, uint32_t d, QString s, QString f, QString n) - : model(m), deviceId(d), serialNumber(s), firmware(f), nickName(n) {}; bool operator==(const DiveComputerNode &a) const; bool operator!=(const DiveComputerNode &a) const; bool changesValues(const DiveComputerNode &b) const; @@ -23,15 +21,12 @@ public: class DiveComputerList { public: - DiveComputerList(); - ~DiveComputerList(); const DiveComputerNode *getExact(const QString &m, uint32_t d); const DiveComputerNode *get(const QString &m); void addDC(QString m, uint32_t d, QString n = QString(), QString s = QString(), QString f = QString()); DiveComputerNode matchDC(const QString &m, uint32_t d); DiveComputerNode matchModel(const QString &m); QMultiMap<QString, DiveComputerNode> dcMap; - QMultiMap<QString, DiveComputerNode> dcWorkingMap; }; extern DiveComputerList dcList; |