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:
Berthold Stoeger 2024-05-29 20:40:18 +02:00 committed by bstoeger
parent 2b3d2f1020
commit 3cb04d230b
34 changed files with 208 additions and 313 deletions

View file

@ -193,10 +193,10 @@ void export_TeX(const char *filename, bool selected_only, bool plain, ExportCall
put_format(&buf, "\\def\\%srating{%s}\n", ssrf, qPrintable(rating));
put_format(&buf, "\\def\\%splot{\\includegraphics[width=9cm,height=4cm]{profile%d}}\n", ssrf, dive->number);
put_format(&buf, "\\def\\%sprofilename{profile%d}\n", ssrf, dive->number);
put_format(&buf, "\\def\\%scomment{%s}\n", ssrf, dive->notes ? dive->notes : "");
put_format(&buf, "\\def\\%sbuddy{%s}\n", ssrf, dive->buddy ? dive->buddy : "");
put_format(&buf, "\\def\\%sdivemaster{%s}\n", ssrf, dive->diveguide ? dive->diveguide : "");
put_format(&buf, "\\def\\%ssuit{%s}\n", ssrf, dive->suit ? dive->suit : "");
put_format(&buf, "\\def\\%scomment{%s}\n", ssrf, dive->notes.c_str());
put_format(&buf, "\\def\\%sbuddy{%s}\n", ssrf, dive->buddy.c_str());
put_format(&buf, "\\def\\%sdivemaster{%s}\n", ssrf, dive->diveguide.c_str());
put_format(&buf, "\\def\\%ssuit{%s}\n", ssrf, dive->suit.c_str());
// Print cylinder data
put_format(&buf, "\n%% Gas use information:\n");