mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: convert weightsystem_t and weightsystem_table to C++
As for cylinders, this had to be done simultaneously, Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
28520da655
commit
640ecb345b
28 changed files with 137 additions and 247 deletions
|
@ -1768,9 +1768,9 @@ struct SuitVariable : public StatsVariableTemplate<StatsVariable::Type::Discrete
|
|||
static std::vector<QString> weightsystems(const dive *d)
|
||||
{
|
||||
std::vector<QString> res;
|
||||
res.reserve(d->weightsystems.nr);
|
||||
for (int i = 0; i < d->weightsystems.nr; ++i)
|
||||
add_to_vector_unique(res, QString(d->weightsystems.weightsystems[i].description).trimmed());
|
||||
res.reserve(d->weightsystems.size());
|
||||
for (auto &ws: d->weightsystems)
|
||||
add_to_vector_unique(res, QString::fromStdString(ws.description).trimmed());
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue