mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: convert divesite strings to std::string
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3916125786
commit
7d3977481a
38 changed files with 181 additions and 222 deletions
|
|
@ -148,7 +148,7 @@ dive_trip_t *create_trip_from_dive(struct dive *dive)
|
|||
dive_trip_t *trip;
|
||||
|
||||
trip = alloc_trip();
|
||||
trip->location = copy_string(get_dive_location(dive));
|
||||
trip->location = copy_string(get_dive_location(dive).c_str());
|
||||
|
||||
return trip;
|
||||
}
|
||||
|
|
@ -265,8 +265,9 @@ dive_trip_t *get_dives_to_autogroup(struct dive_table *table, int start, int *fr
|
|||
if (dive->divetrip || dive->notrip ||
|
||||
dive->when >= lastdive->when + TRIP_THRESHOLD)
|
||||
break;
|
||||
if (get_dive_location(dive) && !trip->location)
|
||||
trip->location = copy_string(get_dive_location(dive));
|
||||
std::string location = get_dive_location(dive);
|
||||
if (!location.empty() && !trip->location)
|
||||
trip->location = copy_string(get_dive_location(dive).c_str());
|
||||
lastdive = dive;
|
||||
}
|
||||
return trip;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue