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
|
@ -711,11 +711,11 @@ static void save_dives_buffer(struct membuffer *b, bool select_only, bool anonym
|
|||
continue;
|
||||
|
||||
put_format(b, "<site uuid='%8x'", ds->uuid);
|
||||
show_utf8_blanked(b, ds->name, " name='", "'", 1, anonymize);
|
||||
show_utf8_blanked(b, ds->name.c_str(), " name='", "'", 1, anonymize);
|
||||
put_location(b, &ds->location, " gps='", "'");
|
||||
show_utf8_blanked(b, ds->description, " description='", "'", 1, anonymize);
|
||||
show_utf8_blanked(b, ds->description.c_str(), " description='", "'", 1, anonymize);
|
||||
put_format(b, ">\n");
|
||||
show_utf8_blanked(b, ds->notes, " <notes>", " </notes>\n", 0, anonymize);
|
||||
show_utf8_blanked(b, ds->notes.c_str(), " <notes>", " </notes>\n", 0, anonymize);
|
||||
for (auto const &t: ds->taxonomy) {
|
||||
if (t.category != TC_NONE && !t.value.empty()) {
|
||||
put_format(b, " <geo cat='%d'", t.category);
|
||||
|
@ -913,11 +913,11 @@ static void save_dive_sites_buffer(struct membuffer *b, const struct dive_site *
|
|||
const struct dive_site *ds = sites[i];
|
||||
|
||||
put_format(b, "<site uuid='%8x'", ds->uuid);
|
||||
show_utf8_blanked(b, ds->name, " name='", "'", 1, anonymize);
|
||||
show_utf8_blanked(b, ds->name.c_str(), " name='", "'", 1, anonymize);
|
||||
put_location(b, &ds->location, " gps='", "'");
|
||||
show_utf8_blanked(b, ds->description, " description='", "'", 1, anonymize);
|
||||
show_utf8_blanked(b, ds->description.c_str(), " description='", "'", 1, anonymize);
|
||||
put_format(b, ">\n");
|
||||
show_utf8_blanked(b, ds->notes, " <notes>", " </notes>\n", 0, anonymize);
|
||||
show_utf8_blanked(b, ds->notes.c_str(), " <notes>", " </notes>\n", 0, anonymize);
|
||||
for (const auto &t: ds->taxonomy) {
|
||||
if (t.category != TC_NONE && !t.value.empty()) {
|
||||
put_format(b, " <geo cat='%d'", t.category);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue