mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: turn struct dive string data into std::string
Much easier memory management! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
2b3d2f1020
commit
3cb04d230b
34 changed files with 208 additions and 313 deletions
|
@ -236,9 +236,9 @@ static int shearwater_dive(void *param, int, char **data, char **)
|
|||
if (data[2])
|
||||
add_dive_site(data[2], state->cur_dive.get(), state);
|
||||
if (data[3])
|
||||
utf8_string(data[3], &state->cur_dive->buddy);
|
||||
utf8_string_std(data[3], &state->cur_dive->buddy);
|
||||
if (data[4])
|
||||
utf8_string(data[4], &state->cur_dive->notes);
|
||||
utf8_string_std(data[4], &state->cur_dive->notes);
|
||||
|
||||
state->metric = atoi(data[5]) == 1 ? 0 : 1;
|
||||
|
||||
|
@ -366,9 +366,9 @@ static int shearwater_cloud_dive(void *param, int, char **data, char **)
|
|||
if (data[2])
|
||||
add_dive_site(data[2], state->cur_dive.get(), state);
|
||||
if (data[3])
|
||||
utf8_string(data[3], &state->cur_dive->buddy);
|
||||
utf8_string_std(data[3], &state->cur_dive->buddy);
|
||||
if (data[4])
|
||||
utf8_string(data[4], &state->cur_dive->notes);
|
||||
utf8_string_std(data[4], &state->cur_dive->notes);
|
||||
|
||||
state->metric = atoi(data[5]) == 1 ? 0 : 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue