core: turn string data in struct divecomputer into std::string

Simplifies memory management.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-18 17:03:19 +02:00 committed by bstoeger
parent cc39f709ce
commit b9a2eff3c9
28 changed files with 114 additions and 147 deletions

View file

@ -34,7 +34,7 @@ struct divecomputer {
enum divemode_t divemode = OC; // dive computer type: OC(default) or CCR
uint8_t no_o2sensors = 0; // rebreathers: number of O2 sensors used
int salinity = 0; // kg per 10000 l
const char *model = nullptr, *serial = nullptr, *fw_version = nullptr;
std::string model, serial, fw_version;
uint32_t deviceid = 0, diveid = 0;
int samples = 0, alloc_samples = 0;
struct sample *sample = nullptr;