@@ -46,8 +46,7 @@ void ApiDB_Way_Updater::add_way(osm_changeset_id_t changeset_id,
46
46
new_way.old_id = old_id;
47
47
48
48
for (const auto &tag : tags)
49
- new_way.tags .push_back (
50
- std::pair<std::string, std::string>(tag.first , tag.second ));
49
+ new_way.tags .emplace_back (tag.first , tag.second );
51
50
52
51
// If the following conditions are still not met, although our XML parser
53
52
// raised an exception for it, it's clearly a programming error.
@@ -78,8 +77,7 @@ void ApiDB_Way_Updater::modify_way(osm_changeset_id_t changeset_id,
78
77
modify_way.changeset_id = changeset_id;
79
78
80
79
for (const auto &tag : tags)
81
- modify_way.tags .push_back (
82
- std::pair<std::string, std::string>(tag.first , tag.second ));
80
+ modify_way.tags .emplace_back (tag.first , tag.second );
83
81
84
82
// If the following conditions are still not met, although our XML parser
85
83
// raised an exception for it, it's clearly a programming error.
@@ -460,7 +458,7 @@ ApiDB_Way_Updater::build_packages(const std::vector<way_t> &ways) {
460
458
++id_to_package[way.id ];
461
459
462
460
if (id_to_package[way.id ] + 1 > result.size ())
463
- result.emplace_back (std::vector<ApiDB_Way_Updater:: way_t >() );
461
+ result.emplace_back ();
464
462
465
463
result.at (id_to_package[way.id ]).emplace_back (way);
466
464
}
0 commit comments