mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
code cleanup: add empty table structures
It seemed to make sense to combine all three types in one commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
70cabb968c
commit
e1cd055111
13 changed files with 47 additions and 41 deletions
|
|
@ -992,10 +992,10 @@ static bool merge_dive_tables(struct dive_table *dives_from, struct dive_table *
|
|||
void add_imported_dives(struct dive_table *import_table, struct trip_table *import_trip_table, struct dive_site_table *import_sites_table, int flags)
|
||||
{
|
||||
int i, idx;
|
||||
struct dive_table dives_to_add = { 0 };
|
||||
struct dive_table dives_to_remove = { 0 };
|
||||
struct trip_table trips_to_add = { 0 };
|
||||
struct dive_site_table dive_sites_to_add = { 0 };
|
||||
struct dive_table dives_to_add = empty_dive_table;
|
||||
struct dive_table dives_to_remove = empty_dive_table;
|
||||
struct trip_table trips_to_add = empty_trip_table;
|
||||
struct dive_site_table dive_sites_to_add = empty_dive_site_table;
|
||||
|
||||
/* Process imported dives and generate lists of dives
|
||||
* to-be-added and to-be-removed */
|
||||
|
|
@ -1121,7 +1121,7 @@ void process_imported_dives(struct dive_table *import_table, struct trip_table *
|
|||
/* If the caller didn't pass an import_trip_table because all
|
||||
* dives are tripless, provide a local table. This may be
|
||||
* necessary if the trips are autogrouped */
|
||||
struct trip_table local_trip_table = { 0 };
|
||||
struct trip_table local_trip_table = empty_trip_table;
|
||||
if (!import_trip_table)
|
||||
import_trip_table = &local_trip_table;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue