mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: macroize dive site table functions, keep table sorted
Turn the table functions of the dive site handling into macros as was already used for dives and dive trips. This has the effect that the table is kept sorted by UUID. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
a6f65d744f
commit
84f7179367
3 changed files with 25 additions and 47 deletions
|
@ -591,7 +591,7 @@ void save_dives_buffer(struct membuffer *b, const bool select_only, bool anonymi
|
|||
put_format(b, "</settings>\n");
|
||||
|
||||
/* save the dive sites - to make the output consistent let's sort the table, first */
|
||||
dive_site_table_sort(&dive_site_table);
|
||||
sort_dive_site_table(&dive_site_table);
|
||||
purge_empty_dive_sites(&dive_site_table);
|
||||
put_format(b, "<divesites>\n");
|
||||
for (i = 0; i < dive_site_table.nr; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue