core: move has_dive() function into struct divelist

Seems natural in a C++ code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-25 14:40:51 +02:00 committed by bstoeger
parent 60c7b503cf
commit 576d3a3bc6
4 changed files with 5 additions and 5 deletions

View file

@ -147,7 +147,7 @@ std::pair<int, const unsigned char *> get_fingerprint_data(const fingerprint_tab
if (it != table.end() && it->model == model && it->serial == serial) {
// std::lower_bound gets us the first element that isn't smaller than what we are looking
// for - so if one is found, we still need to check for equality
if (has_dive(it->fdeviceid, it->fdiveid))
if (divelog.dives.has_dive(it->fdeviceid, it->fdiveid))
return { it->fsize, it->raw_data.get() };
}
return { 0, nullptr };