mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: remove current_dc macro
There were only three users of that. For now do it inline, but we may think about a separate function, which is only available on desktop. Moreover, add nullptr-checks, even if they are not strictly necessary. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5b4d4813f2
commit
d5fafc0e44
3 changed files with 10 additions and 5 deletions
|
@ -20,7 +20,9 @@ TabDiveExtraInfo::~TabDiveExtraInfo()
|
|||
|
||||
void TabDiveExtraInfo::updateData()
|
||||
{
|
||||
extraDataModel->updateDiveComputer(current_dc);
|
||||
const struct divecomputer *currentdc = get_dive_dc(current_dive, dc_number);
|
||||
if (currentdc)
|
||||
extraDataModel->updateDiveComputer(currentdc);
|
||||
}
|
||||
|
||||
void TabDiveExtraInfo::clear()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue