1111#include < boost/algorithm/string/predicate.hpp>
1212#include < vector>
1313
14- output_multi_t ::output_multi_t (const std::string &name,
14+ output_multi_t ::output_multi_t (std::string const &name,
1515 std::shared_ptr<geometry_processor> processor_,
16- const struct export_list &export_list_,
17- const middle_query_t *mid_ ,
18- const options_t &options_ )
19- : output_t (mid_, options_ ),
16+ export_list const &export_list_,
17+ std::shared_ptr< middle_query_t > const &mid ,
18+ options_t const &options )
19+ : output_t (mid, options ),
2020 m_tagtransform (tagtransform_t ::make_tagtransform(&m_options)),
2121 m_export_list(new export_list(export_list_)), m_processor(processor_),
2222 m_proj(m_options.projection),
@@ -40,31 +40,31 @@ output_multi_t::output_multi_t(const std::string &name,
4040{
4141}
4242
43- output_multi_t ::output_multi_t (const output_multi_t &other)
44- : output_t(other.m_mid, other.m_options),
43+ output_multi_t ::output_multi_t (output_multi_t const *other,
44+ std::shared_ptr<middle_query_t > const &mid)
45+ : output_t(mid, other->m_options),
4546 m_tagtransform(tagtransform_t ::make_tagtransform(&m_options)),
46- m_export_list(new export_list(*other. m_export_list)),
47- m_processor(other. m_processor), m_proj(other. m_proj),
48- m_osm_type(other. m_osm_type), m_table(new table_t (*other. m_table)),
47+ m_export_list(new export_list(*other-> m_export_list)),
48+ m_processor(other-> m_processor), m_proj(other-> m_proj),
49+ m_osm_type(other-> m_osm_type), m_table(new table_t (*other-> m_table)),
4950 // NOTE: we need to know which ways were used by relations so each thread
5051 // must have a copy of the original marked done ways, its read only so its
5152 // ok
52- ways_done_tracker(other. ways_done_tracker),
53+ ways_done_tracker(other-> ways_done_tracker),
5354 m_expire(m_options.expire_tiles_zoom, m_options.expire_tiles_max_bbox,
5455 m_options.projection),
5556 buffer(1024 , osmium::memory::Buffer::auto_grow::yes),
5657 m_builder(m_options.projection, m_options.enable_multi),
57- m_way_area(other. m_way_area)
58+ m_way_area(other-> m_way_area)
5859{
5960}
6061
6162output_multi_t ::~output_multi_t () = default ;
6263
63- std::shared_ptr<output_t > output_multi_t::clone (const middle_query_t * cloned_middle) const
64+ std::shared_ptr<output_t >
65+ output_multi_t ::clone(std::shared_ptr<middle_query_t > const &mid) const
6466{
65- auto *clone = new output_multi_t (*this );
66- clone->m_mid = cloned_middle;
67- return std::shared_ptr<output_t >(clone);
67+ return std::shared_ptr<output_t >(new output_multi_t (this , mid));
6868}
6969
7070int output_multi_t::start () {
@@ -365,7 +365,7 @@ int output_multi_t::process_relation(osmium::Relation const &rel,
365365 if (!filter) {
366366 // TODO: move this into geometry processor, figure a way to come back for tag transform
367367 // grab ways/nodes of the members in the relation, bail if none were used
368- if (m_relation_helper.set (rel, m_mid) < 1 )
368+ if (m_relation_helper.set (rel, m_mid. get () ) < 1 )
369369 return 0 ;
370370
371371 // NOTE: make_polygon is preset here this is to force the tag matching
@@ -383,7 +383,7 @@ int output_multi_t::process_relation(osmium::Relation const &rel,
383383 outtags, true );
384384 if (!filter)
385385 {
386- m_relation_helper.add_way_locations (m_mid);
386+ m_relation_helper.add_way_locations (m_mid. get () );
387387 auto geoms = m_processor->process_relation (
388388 rel, m_relation_helper.data , &m_builder);
389389 for (const auto geom : geoms) {
0 commit comments