mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
cc39f709ce
commit
b9a2eff3c9
28 changed files with 114 additions and 147 deletions
|
@ -295,7 +295,7 @@ void uemis::parse_divelog_binary(std::string_view base64, struct dive *dive)
|
|||
dive->dc.salinity = FRESHWATER_SALINITY; /* grams per 10l fresh water */
|
||||
|
||||
/* this will allow us to find the last dive read so far from this computer */
|
||||
dc->model = strdup("Uemis Zurich");
|
||||
dc->model = "Uemis Zurich";
|
||||
dc->deviceid = *(uint32_t *)(data.data() + 9);
|
||||
dc->diveid = *(uint16_t *)(data.data() + 7);
|
||||
/* remember the weight units used in this dive - we may need this later when
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue