core: convert dive computer extra data to C++

Use std::string and std::vector. Much simpler code.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-18 21:04:58 +02:00 committed by bstoeger
parent b9a2eff3c9
commit bc761344d4
14 changed files with 101 additions and 161 deletions

View file

@ -548,7 +548,7 @@ int parse_txt_file(const char *filename, const char *csv, struct divelog *log)
std::string value = parse_mkvi_value(lineptr, key.c_str());
if (value.empty())
break;
add_extra_data(&dive->dc, key.c_str(), value.c_str());
add_extra_data(&dive->dc, key, value);
}
dc = &dive->dc;