mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Do a dive de-dup pass
If given multiple dives at the same time, just de-dup the dives. This happens when you've dumped the whole dive-computer several times, and some dives show up in multiple dumps. When de-duping, try to avoid dropping data. So if one dive has notes attached to it, and the other one does not, pick the notes from the dive that does have them. Obvious stuff like that. The sample merge is also written so that it should be possible to merge two dives. Which we don't actually do yet. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ef0d00e76a
commit
5f05173e79
3 changed files with 181 additions and 5 deletions
5
dive.h
5
dive.h
|
@ -138,4 +138,9 @@ extern void parse_xml_file(const char *filename);
|
|||
extern void flush_dive_info_changes(void);
|
||||
extern void save_dives(const char *filename);
|
||||
|
||||
static inline unsigned int dive_size(int samples)
|
||||
{
|
||||
return sizeof(struct dive) + samples*sizeof(struct sample);
|
||||
}
|
||||
|
||||
#endif /* DIVE_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue