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

@ -98,10 +98,10 @@ static void show_utf8(struct membuffer *b, const char *prefix, const char *value
static void save_overview(struct membuffer *b, struct dive *dive)
{
show_utf8(b, "divemaster ", dive->diveguide, "\n");
show_utf8(b, "buddy ", dive->buddy, "\n");
show_utf8(b, "suit ", dive->suit, "\n");
show_utf8(b, "notes ", dive->notes, "\n");
show_utf8(b, "divemaster ", dive->diveguide.c_str(), "\n");
show_utf8(b, "buddy ", dive->buddy.c_str(), "\n");
show_utf8(b, "suit ", dive->suit.c_str(), "\n");
show_utf8(b, "notes ", dive->notes.c_str(), "\n");
}
static void save_tags(struct membuffer *b, const tag_list &tags)