mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
d183e93bad
commit
2b557f567a
2 changed files with 11 additions and 17 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue