core: move clear_dive() to struct dive

Feels natural in a C++ code base.

Moreover, remove the fulltext-unregistration, as this is a
layering violation.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-25 17:07:24 +02:00 committed by bstoeger
parent 79bf79ad7f
commit df1affc25b
3 changed files with 7 additions and 14 deletions

View file

@ -68,7 +68,7 @@ void DivePlannerPointsModel::createSimpleDive(struct dive *dIn)
// clean out the dive and give it an id and the correct dc model
d = dIn;
dcNr = 0;
clear_dive(d);
d->clear();
d->id = dive_getUniqID();
d->when = QDateTime::currentMSecsSinceEpoch() / 1000L + gettimezoneoffset() + 3600;
make_planner_dc(&d->dcs[0]);