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
|
@ -1281,7 +1281,7 @@ static std::vector<std::string> plot_string(const struct dive *d, const struct p
|
|||
continue;
|
||||
struct gasmix mix = d->get_cylinder(cyl)->gasmix;
|
||||
pressurevalue = get_pressure_units(mbar, &pressure_unit);
|
||||
res.push_back(casprintf_loc(translate("gettextFromC", "P: %d%s (%s)"), pressurevalue, pressure_unit, gasname(mix)));
|
||||
res.push_back(casprintf_loc(translate("gettextFromC", "P: %d%s (%s)"), pressurevalue, pressure_unit, mix.name().c_str()));
|
||||
}
|
||||
if (entry.temperature) {
|
||||
tempvalue = get_temp_units(entry.temperature, &temp_unit);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue