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
|
@ -181,15 +181,8 @@ static int cobalt_dive(void *param, int, char **data, char **)
|
|||
}
|
||||
|
||||
if (location && location_site) {
|
||||
char *tmp = (char *)malloc(strlen(location) + strlen(location_site) + 4);
|
||||
if (!tmp) {
|
||||
free(location);
|
||||
free(location_site);
|
||||
return 1;
|
||||
}
|
||||
sprintf(tmp, "%s / %s", location, location_site);
|
||||
std::string tmp = std::string(location) + " / " + location_site;
|
||||
add_dive_to_dive_site(state->cur_dive, find_or_create_dive_site_with_name(tmp, state->log->sites));
|
||||
free(tmp);
|
||||
}
|
||||
free(location);
|
||||
free(location_site);
|
||||
|
@ -206,7 +199,6 @@ static int cobalt_dive(void *param, int, char **data, char **)
|
|||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
|
||||
extern "C" int parse_cobalt_buffer(sqlite3 *handle, const char *url, const char *, int, struct divelog *log)
|
||||
{
|
||||
int retval;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue