mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: port tag-list to C++
Also adds a new test, which tests merging of two tag-lists. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
640ecb345b
commit
f18acf6fb9
25 changed files with 195 additions and 227 deletions
|
@ -691,7 +691,7 @@ static void smtk_parse_relations(MdbHandle *mdb, struct dive *dive, char *dive_i
|
|||
if (str.empty())
|
||||
continue;
|
||||
if (tag)
|
||||
taglist_add_tag(&dive->tag_list, str.c_str());
|
||||
taglist_add_tag(dive->tags, str);
|
||||
else
|
||||
concat(tmp, ", ", str);
|
||||
if (str.find("SCR") != std::string::npos)
|
||||
|
@ -717,7 +717,7 @@ static void smtk_parse_other(struct dive *dive, const std::vector<std::string> &
|
|||
const std::string &str = list[i];
|
||||
if (!str.empty()) {
|
||||
if (tag)
|
||||
taglist_add_tag(&dive->tag_list, str.c_str());
|
||||
taglist_add_tag(dive->tags, str);
|
||||
else
|
||||
concat(&dive->notes, "\n", format_string_std("Smartrak %s: %s", data_name, str.c_str()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue