Skip to content

Commit 52bc702

Browse files
committed
Use make_shared in a few places
1 parent 93cbb9a commit 52bc702

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/output-flex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,10 +1191,10 @@ std::shared_ptr<output_t>
11911191
output_flex_t::clone(std::shared_ptr<middle_query_t> const &mid,
11921192
std::shared_ptr<db_copy_thread_t> const &copy_thread) const
11931193
{
1194-
return std::shared_ptr<output_t>(new output_flex_t{
1194+
return std::make_shared<output_flex_t>(
11951195
mid, *get_options(), copy_thread, true, m_lua_state, m_has_process_node,
11961196
m_has_process_way, m_has_process_relation, m_tables,
1197-
m_stage2_ways_tracker, m_stage2_rels_tracker});
1197+
m_stage2_ways_tracker, m_stage2_rels_tracker);
11981198
}
11991199

12001200
output_flex_t::output_flex_t(

src/output-null.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ std::shared_ptr<output_t>
55
output_null_t::clone(std::shared_ptr<middle_query_t> const &mid,
66
std::shared_ptr<db_copy_thread_t> const &) const
77
{
8-
return std::shared_ptr<output_t>(new output_null_t{mid, m_options});
8+
return std::make_shared<output_null_t>(mid, m_options);
99
}
1010

1111
output_null_t::output_null_t(std::shared_ptr<middle_query_t> const &mid,

src/reprojection-generic-proj4.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ class generic_reprojection_t : public reprojection
5858

5959
std::shared_ptr<reprojection> reprojection::make_generic_projection(int srs)
6060
{
61-
return std::shared_ptr<reprojection>(new generic_reprojection_t{srs});
61+
return std::make_shared<generic_reprojection_t>(srs);
6262
}

src/reprojection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ std::shared_ptr<reprojection> reprojection::create_projection(int srs)
7777
{
7878
switch (srs) {
7979
case PROJ_LATLONG:
80-
return std::shared_ptr<reprojection>(new latlon_reprojection_t{});
80+
return std::make_shared<latlon_reprojection_t>();
8181
case PROJ_SPHERE_MERC:
82-
return std::shared_ptr<reprojection>(new merc_reprojection_t{});
82+
return std::make_shared<merc_reprojection_t>();
8383
}
8484

8585
return make_generic_projection(srs);

0 commit comments

Comments
 (0)