From 694776eed1f88327237240e122e15b274a87994b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 18 Oct 2020 21:45:50 +0200 Subject: 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 --- core/device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/device.cpp') 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 && -- cgit v1.2.3-70-g09d2