mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: introduce register_dive() function
There was a weird asymmetry, where the undo-commands would register the fulltext index of the dive, but the core would unregister the fulltext index in the "unregister_dive()" function. To make this more logical, create a "register_dive()" function in core that does registers the fulltext index. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
aa60e5d21d
commit
b9df26066e
3 changed files with 21 additions and 12 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#define DIVELIST_H
|
||||
|
||||
#include "units.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
struct dive;
|
||||
|
|
@ -56,6 +57,7 @@ void report_datafile_version(int version);
|
|||
void clear_dive_file_data();
|
||||
void clear_dive_table(struct dive_table *table);
|
||||
struct dive *unregister_dive(int idx);
|
||||
struct dive *register_dive(std::unique_ptr<dive> d);
|
||||
extern bool has_dive(unsigned int deviceid, unsigned int diveid);
|
||||
|
||||
#endif // DIVELIST_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue