mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move add_cylinder() to struct cylinder_table
Feels natural in a C++ code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
22a1120b30
commit
80b5f6bfcd
6 changed files with 12 additions and 13 deletions
|
|
@ -167,9 +167,9 @@ weight_t get_weightsystem_weight(const std::string &name)
|
|||
return it != ws_info_table.end() ? it->weight : weight_t();
|
||||
}
|
||||
|
||||
void add_cylinder(struct cylinder_table *t, int idx, cylinder_t cyl)
|
||||
void cylinder_table::add(int idx, cylinder_t cyl)
|
||||
{
|
||||
t->insert(t->begin() + idx, std::move(cyl));
|
||||
insert(begin() + idx, std::move(cyl));
|
||||
}
|
||||
|
||||
bool weightsystem_t::operator==(const weightsystem_t &w2) const
|
||||
|
|
@ -406,7 +406,7 @@ void add_default_cylinder(struct dive *d)
|
|||
cyl.type.size.mliter = 11100;
|
||||
cyl.type.workingpressure.mbar = 207000;
|
||||
}
|
||||
add_cylinder(&d->cylinders, 0, cyl);
|
||||
d->cylinders.add(0, cyl);
|
||||
reset_cylinders(d, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue