mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move cylinder related functions to struct dive
Seems natural in a C++ code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3aab33ba4c
commit
1b593dc56c
29 changed files with 250 additions and 259 deletions
|
@ -346,7 +346,7 @@ void DiveComponentSelection::buttonClicked(QAbstractButton *button)
|
|||
if (what->cylinders) {
|
||||
text << tr("Cylinders:\n");
|
||||
for (auto [idx, cyl]: enumerated_range(current_dive->cylinders)) {
|
||||
if (is_cylinder_used(current_dive, idx))
|
||||
if (current_dive->is_cylinder_used(idx))
|
||||
text << QString::fromStdString(cyl.type.description) << " " << gasname(cyl.gasmix) << "\n";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,12 +134,12 @@ void TabDiveInformation::updateProfile()
|
|||
QString gaslist, SACs, separator;
|
||||
|
||||
for (size_t i = 0; i < currentDive->cylinders.size(); i++) {
|
||||
if (!is_cylinder_used(currentDive, i))
|
||||
if (!currentDive->is_cylinder_used(i))
|
||||
continue;
|
||||
gaslist.append(separator); volumes.append(separator); SACs.append(separator);
|
||||
separator = "\n";
|
||||
|
||||
gaslist.append(gasname(get_cylinder(currentDive, i)->gasmix));
|
||||
gaslist.append(gasname(currentDive->get_cylinder(i)->gasmix));
|
||||
if (!gases[i].mliter)
|
||||
continue;
|
||||
volumes.append(get_volume_string(gases[i], true));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue