diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-09-14 14:20:37 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-10-03 10:53:26 -0700 |
commit | 2b557f567a33bb837fe32d611e7929cf2a4c92b2 (patch) | |
tree | 9a2ba331626de5af3a264c4a3317145fc7377e55 /core/device.h | |
parent | d183e93bad4a281830b65eb2aae87f3e125284df (diff) | |
download | subsurface-2b557f567a33bb837fe32d611e7929cf2a4c92b2.tar.gz |
cleanup: hide DiveComputerList implementation details
Remove the declaration of helper functions needed only in
core/device.cpp. To this goal, turn the member functions
into free functions.
Cosmetics: turn the DiveComputer[Node|List] "class"es into
"struct"s, since all members were public anyway.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/device.h')
-rw-r--r-- | core/device.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/core/device.h b/core/device.h index 4906a2a49..ba2a882ee 100644 --- a/core/device.h +++ b/core/device.h @@ -26,8 +26,7 @@ extern void clear_device_nodes(); #include <QString> #include <QVector> -class DiveComputerNode { -public: +struct DiveComputerNode { bool operator==(const DiveComputerNode &a) const; bool operator!=(const DiveComputerNode &a) const; bool operator<(const DiveComputerNode &a) const; @@ -39,12 +38,7 @@ public: QString nickName; }; -class DiveComputerList { -public: - 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()); - +struct DiveComputerList { // Keep the dive computers in a vector sorted by (model, deviceId) QVector<DiveComputerNode> dcs; }; |