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:
Berthold Stoeger 2024-07-02 14:49:25 +02:00 committed by bstoeger
parent 22a1120b30
commit 80b5f6bfcd
6 changed files with 12 additions and 13 deletions

View file

@ -51,6 +51,8 @@ struct cylinder_t
struct cylinder_table : public std::vector<cylinder_t> {
cylinder_t &operator[](size_t i);
const cylinder_t &operator[](size_t i) const;
void add(int idx, cylinder_t cyl);
};
struct weightsystem_t
@ -90,9 +92,6 @@ extern int first_hidden_cylinder(const struct dive *d);
extern void dump_cylinders(struct dive *dive, bool verbose);
#endif
/* Cylinder table functions */
extern void add_cylinder(struct cylinder_table *, int idx, cylinder_t cyl);
struct ws_info {
std::string name;
weight_t weight;