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
|
@ -1003,7 +1003,7 @@ static void divinglog_place(char *place, struct dive *d, struct parser_state *st
|
|||
static int divinglog_dive_match(struct dive *dive, const char *name, char *buf, struct parser_state *state)
|
||||
{
|
||||
/* For cylinder related fields, we might have to create a cylinder first. */
|
||||
cylinder_t cyl = { 0 };
|
||||
cylinder_t cyl = empty_cylinder;
|
||||
if (MATCH("tanktype", utf8_string, &cyl.type.description)) {
|
||||
cylinder_t *cyl0 = get_or_create_cylinder(dive, 0);
|
||||
free((void *)cyl0->type.description);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue