mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move gasname() to struct gasmix
Also, turn it to use std::string instead of writing into a global(!) buffer. This was not reentrant. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9c726d8d6f
commit
22a1120b30
14 changed files with 46 additions and 52 deletions
|
|
@ -347,7 +347,8 @@ void DiveComponentSelection::buttonClicked(QAbstractButton *button)
|
|||
text << tr("Cylinders:\n");
|
||||
for (auto [idx, cyl]: enumerated_range(current_dive->cylinders)) {
|
||||
if (current_dive->is_cylinder_used(idx))
|
||||
text << QString::fromStdString(cyl.type.description) << " " << gasname(cyl.gasmix) << "\n";
|
||||
text << QString::fromStdString(cyl.type.description) << " "
|
||||
<< QString::fromStdString(cyl.gasmix.name()) << "\n";
|
||||
}
|
||||
}
|
||||
if (what->weights) {
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ void TabDiveInformation::updateProfile()
|
|||
gaslist.append(separator); volumes.append(separator); SACs.append(separator);
|
||||
separator = "\n";
|
||||
|
||||
gaslist.append(gasname(currentDive->get_cylinder(i)->gasmix));
|
||||
gaslist.append(QString::fromStdString(currentDive->get_cylinder(i)->gasmix.name()));
|
||||
if (!gases[i].mliter)
|
||||
continue;
|
||||
volumes.append(get_volume_string(gases[i], true));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue