diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-06-16 13:22:33 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-06-17 06:53:13 +0900 |
commit | 8e8cd7a8d9304b96cc80fbd2ea63e28d9f7595a3 (patch) | |
tree | c0b9a7f8ff9aafcd6d3c5ce13b312a2a98100bec /core/divecomputer.cpp | |
parent | b0cc4169549e34781e63b25a016b05f1334f33cd (diff) | |
download | subsurface-8e8cd7a8d9304b96cc80fbd2ea63e28d9f7595a3.tar.gz |
Cleanup: remove eplicit constructors and unused member variable
Remove the explicit constructor in DiveComputerNode: Just use
classical C-style struct initialization. Moreover, remove the
empty constructor and destructor of DiveComputerList.
The variable DiveComputerList::dcWorkingMap was unused. Remove.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/divecomputer.cpp')
-rw-r--r-- | core/divecomputer.cpp | 11 |
1 files changed, 1 insertions, 10 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) |