import: turn C-string in device_data_t into std::strings

It was never clear what was a pointer to a static string from
libdivecomputer and what was allocated.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-02 21:26:22 +02:00 committed by bstoeger
parent 0915c1ce43
commit 01306224ff
15 changed files with 120 additions and 129 deletions

View file

@ -153,7 +153,7 @@ extern "C" void ostctools_import(const char *file, struct divelog *log)
report_error(translate("gettextFromC", "Unknown DC in dive %d"), ostcdive->number);
return;
}
std::string tmp = format_string_std("%s %s (Imported from OSTCTools)", devdata.vendor, devdata.model);
std::string tmp = devdata.vendor + " " + devdata.model + " (Imported from OSTCTools)";
ostcdive->dc.model = copy_string(tmp.c_str());
// Parse the dive data