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
|
@ -156,17 +156,17 @@ static void parse_dives(int log_version, const unsigned char *buf, unsigned int
|
|||
model = *(buf + ptr);
|
||||
switch (model) {
|
||||
case 0:
|
||||
dc->model = strdup("Xen");
|
||||
dc->model = "Xen";
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
dc->model = strdup("Xeo");
|
||||
dc->model = "Xeo";
|
||||
break;
|
||||
case 4:
|
||||
dc->model = strdup("Lynx");
|
||||
dc->model = "Lynx";
|
||||
break;
|
||||
default:
|
||||
dc->model = strdup("Liquivision");
|
||||
dc->model = "Liquivision";
|
||||
break;
|
||||
}
|
||||
ptr++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue