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
|
@ -199,7 +199,7 @@ static void parse_dives(int log_version, const unsigned char *buf, unsigned int
|
|||
// Blank notes are better than the default text
|
||||
std::string notes((char *)buf + ptr, len);
|
||||
if (!starts_with(notes, "Comment ..."))
|
||||
dive->notes = strdup(notes.c_str());
|
||||
dive->notes = notes;
|
||||
ptr += len;
|
||||
|
||||
dive->id = array_uint32_le(buf + ptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue