core: remove device-fingerprint C access code

No need to have this code, as all callers are now C++.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-31 08:22:30 +02:00 committed by bstoeger
parent 73f2605ab1
commit 2fd226964c
9 changed files with 69 additions and 128 deletions

View file

@ -582,14 +582,10 @@ static void save_one_device(struct membuffer *b, const struct device &d)
put_format(b, "/>\n");
}
static void save_one_fingerprint(struct membuffer *b, int i)
static void save_one_fingerprint(struct membuffer *b, const fingerprint_record &fp)
{
put_format(b, "<fingerprint model='%08x' serial='%08x' deviceid='%08x' diveid='%08x' data='%s'/>\n",
fp_get_model(&fingerprint_table, i),
fp_get_serial(&fingerprint_table, i),
fp_get_deviceid(&fingerprint_table, i),
fp_get_diveid(&fingerprint_table, i),
fp_get_data(&fingerprint_table, i).c_str());
fp.model, fp.serial, fp.fdeviceid, fp.fdiveid, fp.get_data().c_str());
}
int save_dives(const char *filename)
@ -656,8 +652,8 @@ static void save_dives_buffer(struct membuffer *b, bool select_only, bool anonym
save_one_device(b, d);
}
/* save the fingerprint data */
for (int i = 0; i < nr_fingerprints(&fingerprint_table); i++)
save_one_fingerprint(b, i);
for (auto &fp: fingerprints)
save_one_fingerprint(b, fp);
if (divelog.autogroup)
put_format(b, " <autogroup state='1' />\n");