core: make fp_get_data return an std::string

No need for manual memory management.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-02-29 08:23:55 +01:00 committed by Michael Keller
parent 8d96b7557d
commit 898ecd2df5
4 changed files with 17 additions and 12 deletions

View file

@ -54,7 +54,6 @@ extern uint32_t fp_get_model(struct fingerprint_table *table, unsigned int i);
extern uint32_t fp_get_serial(struct fingerprint_table *table, unsigned int i);
extern uint32_t fp_get_deviceid(struct fingerprint_table *table, unsigned int i);
extern uint32_t fp_get_diveid(struct fingerprint_table *table, unsigned int i);
extern char *fp_get_data(struct fingerprint_table *table, unsigned int i);
extern int is_default_dive_computer_device(const char *);
@ -100,6 +99,8 @@ struct fingerprint_table {
std::vector<fingerprint_record> fingerprints;
};
std::string fp_get_data(struct fingerprint_table *table, unsigned int i);
#endif
#endif // DEVICE_H