mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
code cleanup: introduce empty_cylinder constant
This deals with the issue of initializing structs in C++. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4e419f7445
commit
cef30619d0
12 changed files with 18 additions and 16 deletions
|
@ -1103,7 +1103,7 @@ bool plan(struct deco_state *ds, struct diveplan *diveplan, struct dive *dive, i
|
|||
if (prefs.surface_segment != 0) {
|
||||
// Switch to an empty air cylinder for breathing air at the surface
|
||||
// If no empty cylinder is found, keep using last deco gas
|
||||
cylinder_t cyl = { 0 };
|
||||
cylinder_t cyl = empty_cylinder;
|
||||
cyl.cylinder_use = NOT_USED;
|
||||
add_to_cylinder_table(&dive->cylinders, dive->cylinders.nr, cyl);
|
||||
current_cylinder = dive->cylinders.nr - 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue