diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-10-18 21:45:50 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-10-24 09:51:37 -0700 |
commit | 694776eed1f88327237240e122e15b274a87994b (patch) | |
tree | 70a2445605f3bf0fcf509085bdc6fa68287875ab /core/device.cpp | |
parent | 39a4090c0a6e1d8fe12516be06ee7b31dd4bc96d (diff) | |
download | subsurface-694776eed1f88327237240e122e15b274a87994b.tar.gz |
cleanup: rename set_dc_nickname() to add_devices_of_dive()
The function was misnamed in that it doesn't set the nickname
of a device. Instead, it adds all (unknown) devices of a
dive to the/a device-table. Let's call it appropriately.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/device.cpp')
-rw-r--r-- | core/device.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/device.cpp b/core/device.cpp index 3d3a476d9..bd1d75416 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -342,12 +342,12 @@ extern "C" int is_default_dive_computer_device(const char *name) return qPrefDiveComputer::device() == name; } -extern "C" void set_dc_nickname(struct dive *dive, struct device_table *device_table) +extern "C" void add_devices_of_dive(const struct dive *dive, struct device_table *device_table) { if (!dive) return; - struct divecomputer *dc; + const struct divecomputer *dc; for_each_dc (dive, dc) { if (!empty_string(dc->model) && dc->deviceid && |