mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: turn dive-trip location and notes into std::string
Simpler memory management. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
2fd226964c
commit
3ee41328f9
29 changed files with 157 additions and 179 deletions
|
@ -543,16 +543,16 @@ int save_dive(FILE *f, struct dive *dive, bool anonymize)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void save_trip(struct membuffer *b, dive_trip_t *trip, bool anonymize)
|
||||
static void save_trip(struct membuffer *b, dive_trip *trip, bool anonymize)
|
||||
{
|
||||
int i;
|
||||
struct dive *dive;
|
||||
|
||||
put_format(b, "<trip");
|
||||
show_date(b, trip_date(trip));
|
||||
show_utf8(b, trip->location, " location=\'", "\'", 1);
|
||||
show_utf8(b, trip->location.c_str(), " location=\'", "\'", 1);
|
||||
put_format(b, ">\n");
|
||||
show_utf8(b, trip->notes, "<notes>", "</notes>\n", 0);
|
||||
show_utf8(b, trip->notes.c_str(), "<notes>", "</notes>\n", 0);
|
||||
|
||||
/*
|
||||
* Incredibly cheesy: we want to save the dives sorted, and they
|
||||
|
@ -642,7 +642,7 @@ static void save_dives_buffer(struct membuffer *b, bool select_only, bool anonym
|
|||
{
|
||||
int i;
|
||||
struct dive *dive;
|
||||
dive_trip_t *trip;
|
||||
dive_trip *trip;
|
||||
|
||||
put_format(b, "<divelog program='subsurface' version='%d'>\n<settings>\n", DATAFORMAT_VERSION);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue