From b315eb2167b08a302ef4c8b20db69d23e9cc070c Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 20 Sep 2013 14:00:11 +0100 Subject: [PATCH] + use std::shared_ptr and std::make_shared --- benchmark/run.cpp | 8 ++--- bindings/python/mapnik_datasource.cpp | 10 +++--- bindings/python/mapnik_datasource_cache.cpp | 2 +- bindings/python/mapnik_feature.cpp | 2 +- bindings/python/mapnik_featureset.cpp | 2 +- bindings/python/mapnik_geometry.cpp | 14 ++++---- bindings/python/mapnik_grid.cpp | 2 +- bindings/python/mapnik_grid_view.cpp | 2 +- bindings/python/mapnik_image.cpp | 18 +++++----- .../mapnik_label_collision_detector.cpp | 13 ++++--- bindings/python/mapnik_palette.cpp | 6 ++-- bindings/python/mapnik_parameters.cpp | 10 +++--- bindings/python/mapnik_python.cpp | 10 +++--- bindings/python/mapnik_text_placement.cpp | 32 ++++++++--------- bindings/python/mapnik_wkt_reader.cpp | 4 +-- .../geometry/extensions/index/rtree/rtree.hpp | 5 ++- .../extensions/index/rtree/rtree_leaf.hpp | 3 +- .../extensions/index/rtree/rtree_node.hpp | 4 +-- demo/viewer/layerlistmodel.cpp | 7 +--- demo/viewer/layerlistmodel.hpp | 4 +-- demo/viewer/mainwindow.cpp | 6 ++-- demo/viewer/mapwidget.cpp | 4 +-- demo/viewer/mapwidget.hpp | 6 ++-- demo/viewer/styles_model.cpp | 8 ++--- demo/viewer/styles_model.hpp | 4 +-- include/mapnik/agg_renderer.hpp | 6 ++-- include/mapnik/cairo_context.hpp | 16 ++++----- include/mapnik/cairo_renderer.hpp | 8 ++--- include/mapnik/datasource.hpp | 4 +-- include/mapnik/datasource_cache.hpp | 4 +-- include/mapnik/expression.hpp | 2 +- include/mapnik/expression_string.hpp | 2 +- include/mapnik/feature.hpp | 6 ++-- include/mapnik/feature_factory.hpp | 4 +-- .../mapnik/feature_style_processor_impl.hpp | 4 +-- include/mapnik/font_engine_freetype.hpp | 12 +++---- include/mapnik/formatting/base.hpp | 2 +- include/mapnik/geometry.hpp | 2 +- include/mapnik/grid/grid_renderer.hpp | 2 +- include/mapnik/mapped_memory_cache.hpp | 2 +- include/mapnik/marker.hpp | 6 ++-- include/mapnik/marker_cache.hpp | 2 +- include/mapnik/path_expression.hpp | 2 +- include/mapnik/pool.hpp | 2 +- include/mapnik/raster_colorizer.hpp | 4 +-- include/mapnik/shield_symbolizer.hpp | 2 +- .../mapnik/svg/output/svg_path_iterator.hpp | 6 ++-- include/mapnik/svg/output/svg_renderer.hpp | 2 +- include/mapnik/symbolizer.hpp | 2 +- include/mapnik/text_path.hpp | 2 +- include/mapnik/text_placements/base.hpp | 4 +-- include/mapnik/text_symbolizer.hpp | 2 +- include/mapnik/transform_expression.hpp | 2 +- plugins/input/csv/csv_datasource.cpp | 4 +-- plugins/input/gdal/gdal_datasource.cpp | 4 +-- plugins/input/gdal/gdal_featureset.cpp | 4 +-- plugins/input/geojson/geojson_datasource.cpp | 4 +-- plugins/input/geojson/geojson_datasource.hpp | 4 +-- plugins/input/occi/occi_datasource.cpp | 8 ++--- plugins/input/ogr/ogr_datasource.cpp | 4 +-- plugins/input/osm/osm_datasource.cpp | 4 +-- plugins/input/osm/osm_featureset.cpp | 2 +- plugins/input/postgis/connection.hpp | 4 +-- plugins/input/postgis/connection_manager.hpp | 10 +++--- plugins/input/postgis/cursorresultset.hpp | 6 ++-- plugins/input/postgis/postgis_datasource.cpp | 18 +++++----- plugins/input/postgis/postgis_datasource.hpp | 2 +- plugins/input/postgis/postgis_featureset.cpp | 2 +- plugins/input/postgis/postgis_featureset.hpp | 4 +-- plugins/input/python/python_datasource.cpp | 4 +-- plugins/input/raster/raster_datasource.cpp | 6 ++-- plugins/input/raster/raster_featureset.cpp | 4 +-- .../rasterlite/rasterlite_datasource.cpp | 5 ++- .../rasterlite/rasterlite_featureset.cpp | 4 +-- plugins/input/shape/shape_datasource.cpp | 10 +++--- plugins/input/shape/shape_datasource.hpp | 2 +- plugins/input/shape/shape_featureset.cpp | 2 +- .../input/shape/shape_index_featureset.cpp | 4 +-- plugins/input/shape/shape_io.cpp | 2 +- plugins/input/shape/shape_io.hpp | 4 +-- plugins/input/sqlite/sqlite_connection.hpp | 4 +-- plugins/input/sqlite/sqlite_datasource.cpp | 18 +++++----- plugins/input/sqlite/sqlite_datasource.hpp | 2 +- plugins/input/sqlite/sqlite_featureset.cpp | 2 +- plugins/input/sqlite/sqlite_featureset.hpp | 4 +-- plugins/input/sqlite/sqlite_prepared.hpp | 4 +-- plugins/input/sqlite/sqlite_utils.hpp | 36 +++++++++---------- .../templates/helloworld/hello_datasource.cpp | 2 +- .../templates/helloworld/hello_featureset.cpp | 3 +- src/agg/agg_renderer.cpp | 8 ++--- src/agg/process_point_symbolizer.cpp | 2 +- src/cairo_context.cpp | 2 +- src/cairo_renderer.cpp | 22 ++++++------ src/datasource_cache.cpp | 6 ++-- src/datasource_cache_static.cpp | 2 +- src/expression.cpp | 2 +- src/font_engine_freetype.cpp | 10 +++--- src/formatting/text.cpp | 2 +- src/grid/grid.cpp | 4 +-- src/grid/grid_renderer.cpp | 4 +-- src/grid/process_point_symbolizer.cpp | 2 +- src/load_map.cpp | 20 +++++------ src/map.cpp | 2 +- src/mapped_memory_cache.cpp | 4 +-- src/marker_cache.cpp | 12 +++---- src/memory_datasource.cpp | 4 +-- src/parse_path.cpp | 2 +- src/parse_transform.cpp | 2 +- src/rule.cpp | 4 +-- src/svg/output/svg_renderer.cpp | 4 +-- src/text_placements/dummy.cpp | 2 +- src/text_placements/list.cpp | 3 +- src/text_placements/simple.cpp | 4 +-- src/text_properties.cpp | 2 +- src/tiff_reader.cpp | 2 +- tests/cpp_tests/fontset_runtime_test.cpp | 4 +-- tests/cpp_tests/map_request_test.cpp | 4 +-- utils/pgsql2sqlite/main.cpp | 2 +- utils/pgsql2sqlite/pgsql2sqlite.hpp | 4 +-- utils/pgsql2sqlite/sqlite.hpp | 3 +- 120 files changed, 322 insertions(+), 334 deletions(-) diff --git a/benchmark/run.cpp b/benchmark/run.cpp index 061bcb6e6..baa21d738 100644 --- a/benchmark/run.cpp +++ b/benchmark/run.cpp @@ -98,7 +98,7 @@ bool compare_images(std::string const& src_fn,std::string const& dest_fn) { throw mapnik::image_reader_exception("Failed to load: " + dest_fn); } - boost::shared_ptr image_ptr1 = boost::make_shared(reader1->width(),reader1->height()); + std::shared_ptr image_ptr1 = std::make_shared(reader1->width(),reader1->height()); reader1->read(0,0,image_ptr1->data()); std::unique_ptr reader2(mapnik::get_image_reader(src_fn,"png")); @@ -106,7 +106,7 @@ bool compare_images(std::string const& src_fn,std::string const& dest_fn) { throw mapnik::image_reader_exception("Failed to load: " + src_fn); } - boost::shared_ptr image_ptr2 = boost::make_shared(reader2->width(),reader2->height()); + std::shared_ptr image_ptr2 = std::make_shared(reader2->width(),reader2->height()); reader2->read(0,0,image_ptr2->data()); image_data_32 const& dest = image_ptr1->data(); @@ -156,7 +156,7 @@ struct test2 { unsigned iter_; unsigned threads_; - boost::shared_ptr im_; + std::shared_ptr im_; explicit test2(unsigned iterations, unsigned threads=0) : iter_(iterations), threads_(threads), @@ -168,7 +168,7 @@ struct test2 { throw mapnik::image_reader_exception("Failed to load: " + filename); } - im_ = boost::make_shared(reader->width(),reader->height()); + im_ = std::make_shared(reader->width(),reader->height()); reader->read(0,0,im_->data()); } diff --git a/bindings/python/mapnik_datasource.cpp b/bindings/python/mapnik_datasource.cpp index 85e2ff721..4ed1032d0 100644 --- a/bindings/python/mapnik_datasource.cpp +++ b/bindings/python/mapnik_datasource.cpp @@ -48,7 +48,7 @@ namespace { //user-friendly wrapper that uses Python dictionary using namespace boost::python; -boost::shared_ptr create_datasource(dict const& d) +std::shared_ptr create_datasource(dict const& d) { mapnik::parameters params; boost::python::list keys=d.keys(); @@ -92,7 +92,7 @@ boost::shared_ptr create_datasource(dict const& d) return mapnik::datasource_cache::instance().create(params); } -boost::python::dict describe(boost::shared_ptr const& ds) +boost::python::dict describe(std::shared_ptr const& ds) { boost::python::dict description; mapnik::layer_descriptor ld = ds->get_descriptor(); @@ -103,7 +103,7 @@ boost::python::dict describe(boost::shared_ptr const& ds) return description; } -boost::python::list fields(boost::shared_ptr const& ds) +boost::python::list fields(std::shared_ptr const& ds) { boost::python::list flds; if (ds) @@ -119,7 +119,7 @@ boost::python::list fields(boost::shared_ptr const& ds) } return flds; } -boost::python::list field_types(boost::shared_ptr const& ds) +boost::python::list field_types(std::shared_ptr const& ds) { boost::python::list fld_types; if (ds) @@ -173,7 +173,7 @@ void export_datasource() .value("Collection",mapnik::datasource::Collection) ; - class_, + class_, boost::noncopyable>("Datasource",no_init) .def("type",&datasource::type) .def("geometry_type",&datasource::get_geometry_type) diff --git a/bindings/python/mapnik_datasource_cache.cpp b/bindings/python/mapnik_datasource_cache.cpp index f0230f80b..0ed03fc17 100644 --- a/bindings/python/mapnik_datasource_cache.cpp +++ b/bindings/python/mapnik_datasource_cache.cpp @@ -29,7 +29,7 @@ namespace { using namespace boost::python; -boost::shared_ptr create_datasource(const dict& d) +std::shared_ptr create_datasource(const dict& d) { mapnik::parameters params; boost::python::list keys=d.keys(); diff --git a/bindings/python/mapnik_feature.cpp b/bindings/python/mapnik_feature.cpp index d1e7fc272..057d9465e 100644 --- a/bindings/python/mapnik_feature.cpp +++ b/bindings/python/mapnik_feature.cpp @@ -228,7 +228,7 @@ void export_feature() .def("push", &context_type::push) ; - class_, + class_, boost::noncopyable>("Feature",init("Default ctor.")) .def("id",&mapnik::feature_impl::id) .def("__str__",&mapnik::feature_impl::to_string) diff --git a/bindings/python/mapnik_featureset.cpp b/bindings/python/mapnik_featureset.cpp index c1f7eecd4..eadb2b7df 100644 --- a/bindings/python/mapnik_featureset.cpp +++ b/bindings/python/mapnik_featureset.cpp @@ -65,7 +65,7 @@ inline mapnik::feature_ptr next(mapnik::featureset_ptr const& itr) void export_featureset() { using namespace boost::python; - class_, + class_, boost::noncopyable>("Featureset",no_init) .def("__iter__",pass_through) .def("next",next) diff --git a/bindings/python/mapnik_geometry.cpp b/bindings/python/mapnik_geometry.cpp index 9b7c3fb14..6e5127f39 100644 --- a/bindings/python/mapnik_geometry.cpp +++ b/bindings/python/mapnik_geometry.cpp @@ -79,25 +79,25 @@ void add_geojson_impl(path_type& p, std::string const& json) throw std::runtime_error("Failed to parse geojson geometry"); } -boost::shared_ptr from_wkt_impl(std::string const& wkt) +std::shared_ptr from_wkt_impl(std::string const& wkt) { - boost::shared_ptr paths = boost::make_shared(); + std::shared_ptr paths = std::make_shared(); if (!mapnik::from_wkt(wkt, *paths)) throw std::runtime_error("Failed to parse WKT"); return paths; } -boost::shared_ptr from_wkb_impl(std::string const& wkb) +std::shared_ptr from_wkb_impl(std::string const& wkb) { - boost::shared_ptr paths = boost::make_shared(); + std::shared_ptr paths = std::make_shared(); if (!mapnik::geometry_utils::from_wkb(*paths, wkb.c_str(), wkb.size())) throw std::runtime_error("Failed to parse WKB"); return paths; } -boost::shared_ptr from_geojson_impl(std::string const& json) +std::shared_ptr from_geojson_impl(std::string const& json) { - boost::shared_ptr paths = boost::make_shared(); + std::shared_ptr paths = std::make_shared(); if (! mapnik::json::from_geojson(json, *paths)) throw std::runtime_error("Failed to parse geojson geometry"); return paths; @@ -294,7 +294,7 @@ void export_geometry() // TODO add other geometry_type methods ; - class_, boost::noncopyable>("Path") + class_, boost::noncopyable>("Path") .def("__getitem__", getitem_impl,return_value_policy()) .def("__len__", &path_type::size) .def("envelope",envelope_impl) diff --git a/bindings/python/mapnik_grid.cpp b/bindings/python/mapnik_grid.cpp index 09b21ee3d..b57b162e0 100644 --- a/bindings/python/mapnik_grid.cpp +++ b/bindings/python/mapnik_grid.cpp @@ -55,7 +55,7 @@ mapnik::grid::value_type get_pixel(mapnik::grid const& grid, int x, int y) void export_grid() { - class_ >( + class_ >( "Grid", "This class represents a feature hitgrid.", init( diff --git a/bindings/python/mapnik_grid_view.cpp b/bindings/python/mapnik_grid_view.cpp index 5e9d2745f..82e687ed2 100644 --- a/bindings/python/mapnik_grid_view.cpp +++ b/bindings/python/mapnik_grid_view.cpp @@ -41,7 +41,7 @@ static dict (*encode)( mapnik::grid_view const&, std::string const& , bool, unsi void export_grid_view() { class_ >("GridView", + std::shared_ptr >("GridView", "This class represents a feature hitgrid subset.",no_init) .def("width",&mapnik::grid_view::width) .def("height",&mapnik::grid_view::height) diff --git a/bindings/python/mapnik_image.cpp b/bindings/python/mapnik_image.cpp index 884f1324a..9379037dc 100644 --- a/bindings/python/mapnik_image.cpp +++ b/bindings/python/mapnik_image.cpp @@ -146,7 +146,7 @@ void set_pixel(mapnik::image_32 & im, unsigned x, unsigned y, mapnik::color cons im.setPixel(x, y, c.rgba()); } -boost::shared_ptr open_from_file(std::string const& filename) +std::shared_ptr open_from_file(std::string const& filename) { boost::optional type = type_from_filename(filename); if (type) @@ -155,7 +155,7 @@ boost::shared_ptr open_from_file(std::string const& filename) if (reader.get()) { - boost::shared_ptr image_ptr = boost::make_shared(reader->width(),reader->height()); + std::shared_ptr image_ptr = std::make_shared(reader->width(),reader->height()); reader->read(0,0,image_ptr->data()); return image_ptr; } @@ -164,19 +164,19 @@ boost::shared_ptr open_from_file(std::string const& filename) throw mapnik::image_reader_exception("Unsupported image format:" + filename); } -boost::shared_ptr fromstring(std::string const& str) +std::shared_ptr fromstring(std::string const& str) { std::unique_ptr reader(get_image_reader(str.c_str(),str.size())); if (reader.get()) { - boost::shared_ptr image_ptr = boost::make_shared(reader->width(),reader->height()); + std::shared_ptr image_ptr = std::make_shared(reader->width(),reader->height()); reader->read(0,0,image_ptr->data()); return image_ptr; } throw mapnik::image_reader_exception("Failed to load image from buffer" ); } -boost::shared_ptr frombuffer(PyObject * obj) +std::shared_ptr frombuffer(PyObject * obj) { void const* buffer=0; Py_ssize_t buffer_len; @@ -185,7 +185,7 @@ boost::shared_ptr frombuffer(PyObject * obj) std::unique_ptr reader(get_image_reader(reinterpret_cast(buffer),buffer_len)); if (reader.get()) { - boost::shared_ptr image_ptr = boost::make_shared(reader->width(),reader->height()); + std::shared_ptr image_ptr = std::make_shared(reader->width(),reader->height()); reader->read(0,0,image_ptr->data()); return image_ptr; } @@ -205,10 +205,10 @@ void composite(image_32 & dst, image_32 & src, mapnik::composite_mode_e mode, fl } #if defined(HAVE_CAIRO) && defined(HAVE_PYCAIRO) -boost::shared_ptr from_cairo(PycairoSurface* py_surface) +std::shared_ptr from_cairo(PycairoSurface* py_surface) { mapnik::cairo_surface_ptr surface(py_surface->surface, mapnik::cairo_surface_closer()); - boost::shared_ptr image_ptr = boost::make_shared(surface); + std::shared_ptr image_ptr = std::make_shared(surface); return image_ptr; } #endif @@ -253,7 +253,7 @@ void export_image() .value("value", mapnik::_value) ; - class_ >("Image","This class represents a 32 bit RGBA image.",init()) + class_ >("Image","This class represents a 32 bit RGBA image.",init()) .def("width",&image_32::width) .def("height",&image_32::height) .def("view",&image_32::get_view) diff --git a/bindings/python/mapnik_label_collision_detector.cpp b/bindings/python/mapnik_label_collision_detector.cpp index 55747e41f..e3b047d89 100644 --- a/bindings/python/mapnik_label_collision_detector.cpp +++ b/bindings/python/mapnik_label_collision_detector.cpp @@ -35,27 +35,26 @@ using mapnik::label_collision_detector4; using mapnik::box2d; using mapnik::Map; -using boost::make_shared; namespace { -boost::shared_ptr +std::shared_ptr create_label_collision_detector_from_extent(box2d const &extent) { - return make_shared(extent); + return std::make_shared(extent); } -boost::shared_ptr +std::shared_ptr create_label_collision_detector_from_map(Map const &m) { double buffer = m.buffer_size(); box2d extent(-buffer, -buffer, m.width() + buffer, m.height() + buffer); - return make_shared(extent); + return std::make_shared(extent); } boost::python::list -make_label_boxes(boost::shared_ptr det) +make_label_boxes(std::shared_ptr det) { boost::python::list boxes; @@ -77,7 +76,7 @@ void export_label_collision_detector() // for overload resolution void (label_collision_detector4::*insert_box)(box2d const &) = &label_collision_detector4::insert; - class_, boost::noncopyable> + class_, boost::noncopyable> ("LabelCollisionDetector", "Object to detect collisions between labels, used in the rendering process.", no_init) diff --git a/bindings/python/mapnik_palette.cpp b/bindings/python/mapnik_palette.cpp index d28f081c8..203694768 100644 --- a/bindings/python/mapnik_palette.cpp +++ b/bindings/python/mapnik_palette.cpp @@ -31,7 +31,7 @@ // stl #include -static boost::shared_ptr make_palette( std::string const& palette, std::string const& format ) +static std::shared_ptr make_palette( std::string const& palette, std::string const& format ) { mapnik::rgba_palette::palette_type type = mapnik::rgba_palette::PALETTE_RGBA; if (format == "rgb") @@ -40,7 +40,7 @@ static boost::shared_ptr make_palette( std::string const& type = mapnik::rgba_palette::PALETTE_ACT; else throw std::runtime_error("invalid type passed for mapnik.Palette: must be either rgba, rgb, or act"); - return boost::make_shared(palette, type); + return std::make_shared(palette, type); } void export_palette () @@ -48,7 +48,7 @@ void export_palette () using namespace boost::python; class_, + std::shared_ptr, boost::noncopyable >("Palette",no_init) //, init( // ( arg("palette"), arg("type")), diff --git a/bindings/python/mapnik_parameters.cpp b/bindings/python/mapnik_parameters.cpp index eb213e2d1..2a8884374 100644 --- a/bindings/python/mapnik_parameters.cpp +++ b/bindings/python/mapnik_parameters.cpp @@ -176,22 +176,22 @@ mapnik::value_holder get_param(mapnik::parameter const& p, int index) } } -boost::shared_ptr create_parameter(mapnik::value_unicode_string const& key, mapnik::value_holder const& value) +std::shared_ptr create_parameter(mapnik::value_unicode_string const& key, mapnik::value_holder const& value) { std::string key_utf8; mapnik::to_utf8(key, key_utf8); - return boost::make_shared(key_utf8,value); + return std::make_shared(key_utf8,value); } // needed for Python_Unicode to std::string (utf8) conversion -boost::shared_ptr create_parameter_from_string(mapnik::value_unicode_string const& key, mapnik::value_unicode_string const& ustr) +std::shared_ptr create_parameter_from_string(mapnik::value_unicode_string const& key, mapnik::value_unicode_string const& ustr) { std::string key_utf8; std::string ustr_utf8; mapnik::to_utf8(key, key_utf8); mapnik::to_utf8(ustr,ustr_utf8); - return boost::make_shared(key_utf8, ustr_utf8); + return std::make_shared(key_utf8, ustr_utf8); } void export_parameters() @@ -202,7 +202,7 @@ void export_parameters() implicitly_convertible(); implicitly_convertible(); - class_ >("Parameter",no_init) + class_ >("Parameter",no_init) .def("__init__", make_constructor(create_parameter), "Create a mapnik.Parameter from a pair of values, the first being a string\n" "and the second being either a string, and integer, or a float") diff --git a/bindings/python/mapnik_python.cpp b/bindings/python/mapnik_python.cpp index 7a97867f2..b932a98d0 100644 --- a/bindings/python/mapnik_python.cpp +++ b/bindings/python/mapnik_python.cpp @@ -138,7 +138,7 @@ void render(const mapnik::Map& map, void render_with_detector( const mapnik::Map &map, mapnik::image_32 &image, - boost::shared_ptr detector, + std::shared_ptr detector, double scale_factor = 1.0, unsigned offset_x = 0u, unsigned offset_y = 0u) @@ -213,7 +213,7 @@ void render6(const mapnik::Map& map, PycairoContext* py_context) void render_with_detector2( const mapnik::Map& map, PycairoContext* py_context, - boost::shared_ptr detector) + std::shared_ptr detector) { python_unblock_auto_block b; mapnik::cairo_ptr context(py_context->ctx, mapnik::cairo_closer()); @@ -224,7 +224,7 @@ void render_with_detector2( void render_with_detector3( const mapnik::Map& map, PycairoContext* py_context, - boost::shared_ptr detector, + std::shared_ptr detector, double scale_factor = 1.0, unsigned offset_x = 0u, unsigned offset_y = 0u) @@ -238,7 +238,7 @@ void render_with_detector3( void render_with_detector4( const mapnik::Map& map, PycairoSurface* py_surface, - boost::shared_ptr detector) + std::shared_ptr detector) { python_unblock_auto_block b; mapnik::cairo_surface_ptr surface(cairo_surface_reference(py_surface->surface), mapnik::cairo_surface_closer()); @@ -249,7 +249,7 @@ void render_with_detector4( void render_with_detector5( const mapnik::Map& map, PycairoSurface* py_surface, - boost::shared_ptr detector, + std::shared_ptr detector, double scale_factor = 1.0, unsigned offset_x = 0u, unsigned offset_y = 0u) diff --git a/bindings/python/mapnik_text_placement.cpp b/bindings/python/mapnik_text_placement.cpp index c2b08eb50..deaae18bb 100644 --- a/bindings/python/mapnik_text_placement.cpp +++ b/bindings/python/mapnik_text_placement.cpp @@ -432,17 +432,17 @@ void export_text_placement() ; class_, + std::shared_ptr, boost::noncopyable> ("TextPlacements") .def_readwrite("defaults", &text_placements::defaults) .def("get_placement_info", pure_virtual(&text_placements::get_placement_info)) /* TODO: add_expressions() */ ; - register_ptr_to_python >(); + register_ptr_to_python >(); class_, + std::shared_ptr, boost::noncopyable> ("TextPlacementInfo", init()) @@ -453,11 +453,11 @@ void export_text_placement() .def_readwrite("properties", &text_placement_info::properties) .def_readwrite("scale_factor", &text_placement_info::scale_factor) ; - register_ptr_to_python >(); + register_ptr_to_python >(); class_, + std::shared_ptr, boost::noncopyable> ("ProcessedText", no_init) .def("push_back", &processed_text::push_back) @@ -466,7 +466,7 @@ void export_text_placement() class_, + std::shared_ptr, boost::noncopyable> ("ExpressionSet") .def("insert", &insert_expression); @@ -475,7 +475,7 @@ void export_text_placement() //TODO: Python namespace class_, + std::shared_ptr, boost::noncopyable> ("FormattingNode") .def("apply", pure_virtual(&formatting::node::apply)) @@ -483,11 +483,11 @@ void export_text_placement() &formatting::node::add_expressions, &NodeWrap::default_add_expressions) ; - register_ptr_to_python >(); + register_ptr_to_python >(); class_, + std::shared_ptr, bases, boost::noncopyable> ("FormattingText", init()) @@ -497,11 +497,11 @@ void export_text_placement() &formatting::text_node::get_text, &formatting::text_node::set_text) ; - register_ptr_to_python >(); + register_ptr_to_python >(); class_with_converter, + std::shared_ptr, bases, boost::noncopyable> ("FormattingFormat") @@ -522,10 +522,10 @@ void export_text_placement() &formatting::format_node::get_child, &formatting::format_node::set_child) ; - register_ptr_to_python >(); + register_ptr_to_python >(); class_, + std::shared_ptr, bases, boost::noncopyable> ("FormattingList", init<>()) @@ -538,10 +538,10 @@ void export_text_placement() .def("append", &ListNodeWrap::append) ; - register_ptr_to_python >(); + register_ptr_to_python >(); class_, + std::shared_ptr, bases, boost::noncopyable> ("FormattingExpressionFormat") @@ -561,7 +561,7 @@ void export_text_placement() &formatting::expression_format::get_child, &formatting::expression_format::set_child) ; - register_ptr_to_python >(); + register_ptr_to_python >(); //TODO: registry } diff --git a/bindings/python/mapnik_wkt_reader.cpp b/bindings/python/mapnik_wkt_reader.cpp index 3e9fa9be4..2c041412b 100644 --- a/bindings/python/mapnik_wkt_reader.cpp +++ b/bindings/python/mapnik_wkt_reader.cpp @@ -34,9 +34,9 @@ namespace impl { typedef boost::ptr_vector path_type; -boost::shared_ptr from_wkt(mapnik::wkt_parser & p, std::string const& wkt) +std::shared_ptr from_wkt(mapnik::wkt_parser & p, std::string const& wkt) { - boost::shared_ptr paths = boost::make_shared(); + std::shared_ptr paths = std::make_shared(); if (!p.parse(wkt, *paths)) throw std::runtime_error("Failed to parse WKT"); return paths; diff --git a/boost/geometry/extensions/index/rtree/rtree.hpp b/boost/geometry/extensions/index/rtree/rtree.hpp index 372a27d03..4b9c50886 100644 --- a/boost/geometry/extensions/index/rtree/rtree.hpp +++ b/boost/geometry/extensions/index/rtree/rtree.hpp @@ -32,8 +32,8 @@ class rtree { public: - typedef boost::shared_ptr > node_pointer; - typedef boost::shared_ptr > leaf_pointer; + typedef std::shared_ptr > node_pointer; + typedef std::shared_ptr > leaf_pointer; /** * \brief Creates a rtree with 'maximum' elements per node and 'minimum'. @@ -771,4 +771,3 @@ private: }}} // namespace boost::geometry::index #endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RTREE_HPP - diff --git a/boost/geometry/extensions/index/rtree/rtree_leaf.hpp b/boost/geometry/extensions/index/rtree/rtree_leaf.hpp index 95d1a86b1..1309c4188 100644 --- a/boost/geometry/extensions/index/rtree/rtree_leaf.hpp +++ b/boost/geometry/extensions/index/rtree/rtree_leaf.hpp @@ -33,7 +33,7 @@ class rtree_leaf : public rtree_node public: /// container type for the leaves - typedef boost::shared_ptr > node_pointer; + typedef std::shared_ptr > node_pointer; typedef std::vector > leaf_map; /** @@ -250,4 +250,3 @@ private: }}} // namespace boost::geometry::index #endif // BOOST_GEOMETRY_EXTENSIONS_INDEX_RTREE_RTREE_LEAF_HPP - diff --git a/boost/geometry/extensions/index/rtree/rtree_node.hpp b/boost/geometry/extensions/index/rtree/rtree_node.hpp index de35ef270..f0eaff9c9 100644 --- a/boost/geometry/extensions/index/rtree/rtree_node.hpp +++ b/boost/geometry/extensions/index/rtree/rtree_node.hpp @@ -37,8 +37,8 @@ class rtree_node { public: - typedef boost::shared_ptr > node_pointer; - typedef boost::shared_ptr > leaf_pointer; + typedef std::shared_ptr > node_pointer; + typedef std::shared_ptr > leaf_pointer; /// type for the node map typedef std::vector > node_map; diff --git a/demo/viewer/layerlistmodel.cpp b/demo/viewer/layerlistmodel.cpp index a85645174..4b1a89a8d 100644 --- a/demo/viewer/layerlistmodel.cpp +++ b/demo/viewer/layerlistmodel.cpp @@ -27,7 +27,7 @@ using mapnik::Map; -LayerListModel::LayerListModel(boost::shared_ptr map,QObject *parent) +LayerListModel::LayerListModel(std::shared_ptr map,QObject *parent) : QAbstractListModel(parent), map_(map) {} @@ -117,8 +117,3 @@ boost::optional LayerListModel::map_layer(int i) } return boost::optional(); } - - - - - diff --git a/demo/viewer/layerlistmodel.hpp b/demo/viewer/layerlistmodel.hpp index 7c155d95e..f25a81f59 100644 --- a/demo/viewer/layerlistmodel.hpp +++ b/demo/viewer/layerlistmodel.hpp @@ -34,7 +34,7 @@ class LayerListModel : public QAbstractListModel { Q_OBJECT public: - LayerListModel(boost::shared_ptr map, QObject * parent = 0); + LayerListModel(std::shared_ptr map, QObject * parent = 0); int rowCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, @@ -45,7 +45,7 @@ class LayerListModel : public QAbstractListModel boost::optional map_layer(int i); private: - boost::shared_ptr map_; + std::shared_ptr map_; }; #endif //LAYER_LIST_MODEL_HPP diff --git a/demo/viewer/mainwindow.cpp b/demo/viewer/mainwindow.cpp index e87e7a0d4..f2099e4c4 100644 --- a/demo/viewer/mainwindow.cpp +++ b/demo/viewer/mainwindow.cpp @@ -185,7 +185,7 @@ void MainWindow::load_map_file(QString const& filename) std::cout<<"loading "<< filename.toStdString() << std::endl; unsigned width = mapWidget_->width(); unsigned height = mapWidget_->height(); - boost::shared_ptr map(new mapnik::Map(width,height)); + std::shared_ptr map(new mapnik::Map(width,height)); mapWidget_->setMap(map); try { @@ -412,7 +412,7 @@ void MainWindow::set_default_extent(double x0,double y0, double x1, double y1) { try { - boost::shared_ptr map_ptr = mapWidget_->getMap(); + std::shared_ptr map_ptr = mapWidget_->getMap(); if (map_ptr) { mapnik::projection prj(map_ptr->srs()); @@ -433,7 +433,7 @@ void MainWindow::set_scaling_factor(double scaling_factor) void MainWindow::zoom_all() { - boost::shared_ptr map_ptr = mapWidget_->getMap(); + std::shared_ptr map_ptr = mapWidget_->getMap(); if (map_ptr) { map_ptr->zoom_all(); diff --git a/demo/viewer/mapwidget.cpp b/demo/viewer/mapwidget.cpp index dfe4bd682..9364ac8fe 100644 --- a/demo/viewer/mapwidget.cpp +++ b/demo/viewer/mapwidget.cpp @@ -606,12 +606,12 @@ void MapWidget::updateMap() } } -boost::shared_ptr MapWidget::getMap() +std::shared_ptr MapWidget::getMap() { return map_; } -void MapWidget::setMap(boost::shared_ptr map) +void MapWidget::setMap(std::shared_ptr map) { map_ = map; } diff --git a/demo/viewer/mapwidget.hpp b/demo/viewer/mapwidget.hpp index 11026a546..873d659eb 100644 --- a/demo/viewer/mapwidget.hpp +++ b/demo/viewer/mapwidget.hpp @@ -55,7 +55,7 @@ public: }; private: - boost::shared_ptr map_; + std::shared_ptr map_; int selected_; QPixmap pix_; mapnik::box2d extent_; @@ -73,9 +73,9 @@ private: public: MapWidget(QWidget *parent=0); void setTool(eTool tool); - boost::shared_ptr getMap(); + std::shared_ptr getMap(); inline QPixmap const& pixmap() const { return pix_;} - void setMap(boost::shared_ptr map); + void setMap(std::shared_ptr map); void defaultView(); void zoomToBox(mapnik::box2d const& box); void zoomIn(); diff --git a/demo/viewer/styles_model.cpp b/demo/viewer/styles_model.cpp index 208669ac0..229cbdf9f 100644 --- a/demo/viewer/styles_model.cpp +++ b/demo/viewer/styles_model.cpp @@ -199,7 +199,7 @@ struct symbolizer_icon : public boost::static_visitor { // FIXME! /* - boost::shared_ptr symbol = sym.get_image(); + std::shared_ptr symbol = sym.get_image(); if (symbol) { QImage image(symbol->getBytes(), @@ -303,7 +303,7 @@ private: class map_node { public: - explicit map_node(boost::shared_ptr map) + explicit map_node(std::shared_ptr map) : map_(map) {} ~map_node() {} @@ -318,10 +318,10 @@ public: } private: - boost::shared_ptr map_; + std::shared_ptr map_; }; -StyleModel::StyleModel(boost::shared_ptr map, QObject * parent) +StyleModel::StyleModel(std::shared_ptr map, QObject * parent) : QAbstractItemModel(parent), root_(new node(map_node(map))) { diff --git a/demo/viewer/styles_model.hpp b/demo/viewer/styles_model.hpp index 5dfb9190f..b162c92ef 100644 --- a/demo/viewer/styles_model.hpp +++ b/demo/viewer/styles_model.hpp @@ -34,7 +34,7 @@ class StyleModel : public QAbstractItemModel { Q_OBJECT public: - StyleModel(boost::shared_ptr map, QObject * parent=0); + StyleModel(std::shared_ptr map, QObject * parent=0); ~StyleModel(); // interface QModelIndex index (int row, int col, QModelIndex const& parent = QModelIndex()) const; @@ -43,7 +43,7 @@ class StyleModel : public QAbstractItemModel int columnCount( QModelIndex const& parent = QModelIndex()) const; QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const; private: - //boost::shared_ptr map_; + //std::shared_ptr map_; boost::scoped_ptr root_; }; diff --git a/include/mapnik/agg_renderer.hpp b/include/mapnik/agg_renderer.hpp index be248ea94..adfdb3dd4 100644 --- a/include/mapnik/agg_renderer.hpp +++ b/include/mapnik/agg_renderer.hpp @@ -68,7 +68,7 @@ public: // create with default, empty placement detector agg_renderer(Map const& m, T & pixmap, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0); // create with external placement detector, possibly non-empty - agg_renderer(Map const &m, T & pixmap, boost::shared_ptr detector, + agg_renderer(Map const &m, T & pixmap, std::shared_ptr detector, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0); // pass in mapnik::request object to provide the mutable things per render agg_renderer(Map const& m, request const& req, T & pixmap, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0); @@ -147,7 +147,7 @@ protected: private: buffer_type & pixmap_; - boost::shared_ptr internal_buffer_; + std::shared_ptr internal_buffer_; mutable buffer_type * current_buffer_; mutable bool style_level_compositing_; unsigned width_; @@ -156,7 +156,7 @@ private: CoordTransform t_; freetype_engine font_engine_; face_manager font_manager_; - boost::shared_ptr detector_; + std::shared_ptr detector_; boost::scoped_ptr ras_ptr; box2d query_extent_; gamma_method_e gamma_method_; diff --git a/include/mapnik/cairo_context.hpp b/include/mapnik/cairo_context.hpp index 1011c1b3d..e71d200df 100644 --- a/include/mapnik/cairo_context.hpp +++ b/include/mapnik/cairo_context.hpp @@ -78,18 +78,18 @@ void check_object_status_and_throw_exception(T const& object) class cairo_face : private mapnik::noncopyable { public: - cairo_face(boost::shared_ptr const& engine, face_ptr const& face); + cairo_face(std::shared_ptr const& engine, face_ptr const& face); ~cairo_face(); cairo_font_face_t * face() const; private: class handle { public: - handle(boost::shared_ptr const& engine, face_ptr const& face) + handle(std::shared_ptr const& engine, face_ptr const& face) : engine_(engine), face_(face) {} private: - boost::shared_ptr engine_; + std::shared_ptr engine_; face_ptr face_; }; @@ -104,17 +104,17 @@ private: cairo_font_face_t *c_face_; }; -typedef boost::shared_ptr cairo_face_ptr; +typedef std::shared_ptr cairo_face_ptr; class cairo_face_manager : private mapnik::noncopyable { public: - cairo_face_manager(boost::shared_ptr engine); + cairo_face_manager(std::shared_ptr engine); cairo_face_ptr get_face(face_ptr face); private: typedef std::map cairo_face_cache; - boost::shared_ptr font_engine_; + std::shared_ptr font_engine_; cairo_face_cache cache_; }; @@ -268,8 +268,8 @@ struct cairo_surface_closer } }; -typedef boost::shared_ptr cairo_ptr; -typedef boost::shared_ptr cairo_surface_ptr; +typedef std::shared_ptr cairo_ptr; +typedef std::shared_ptr cairo_surface_ptr; inline cairo_ptr create_context(cairo_surface_ptr const& surface) { diff --git a/include/mapnik/cairo_renderer.hpp b/include/mapnik/cairo_renderer.hpp index c2278231d..5cbab623d 100644 --- a/include/mapnik/cairo_renderer.hpp +++ b/include/mapnik/cairo_renderer.hpp @@ -67,7 +67,7 @@ protected: unsigned offset_y=0); cairo_renderer_base(Map const& m, cairo_ptr const& cairo, - boost::shared_ptr detector, + std::shared_ptr detector, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0); @@ -143,10 +143,10 @@ protected: unsigned height_; double scale_factor_; CoordTransform t_; - boost::shared_ptr font_engine_; + std::shared_ptr font_engine_; face_manager font_manager_; cairo_face_manager face_manager_; - boost::shared_ptr detector_; + std::shared_ptr detector_; box2d query_extent_; void setup(Map const& m); }; @@ -170,7 +170,7 @@ public: unsigned offset_y=0); cairo_renderer(Map const& m, T const& obj, - boost::shared_ptr detector, + std::shared_ptr detector, double scale_factor=1.0, unsigned offset_x=0, unsigned offset_y=0); diff --git a/include/mapnik/datasource.hpp b/include/mapnik/datasource.hpp index b2edb91d4..ee205e186 100644 --- a/include/mapnik/datasource.hpp +++ b/include/mapnik/datasource.hpp @@ -47,7 +47,7 @@ struct MAPNIK_DECL Featureset : private mapnik::noncopyable virtual ~Featureset() {} }; -typedef boost::shared_ptr featureset_ptr; +typedef std::shared_ptr featureset_ptr; class MAPNIK_DECL datasource_exception : public std::exception { @@ -132,7 +132,7 @@ public: } }; -typedef boost::shared_ptr datasource_ptr; +typedef std::shared_ptr datasource_ptr; #ifdef MAPNIK_STATIC_PLUGINS #define DATASOURCE_PLUGIN(classname) diff --git a/include/mapnik/datasource_cache.hpp b/include/mapnik/datasource_cache.hpp index 74a70c992..b42a1985c 100644 --- a/include/mapnik/datasource_cache.hpp +++ b/include/mapnik/datasource_cache.hpp @@ -49,11 +49,11 @@ public: std::string plugin_directories(); void register_datasources(std::string const& path); bool register_datasource(std::string const& path); - boost::shared_ptr create(parameters const& params); + std::shared_ptr create(parameters const& params); private: datasource_cache(); ~datasource_cache(); - std::map > plugins_; + std::map > plugins_; bool registered_; std::vector plugin_directories_; }; diff --git a/include/mapnik/expression.hpp b/include/mapnik/expression.hpp index 8672074ee..25eccc863 100644 --- a/include/mapnik/expression.hpp +++ b/include/mapnik/expression.hpp @@ -39,7 +39,7 @@ namespace mapnik // fwd declare to reduce compile time template struct expression_grammar; -typedef boost::shared_ptr expression_ptr; +typedef std::shared_ptr expression_ptr; typedef std::set expression_set; diff --git a/include/mapnik/expression_string.hpp b/include/mapnik/expression_string.hpp index 565bc13f4..2f445755d 100644 --- a/include/mapnik/expression_string.hpp +++ b/include/mapnik/expression_string.hpp @@ -56,7 +56,7 @@ std::string to_expression_string(T const* expr_node_ptr) } template -std::string to_expression_string(boost::shared_ptr const& expr_node_ptr) +std::string to_expression_string(std::shared_ptr const& expr_node_ptr) { throw std::logic_error("to_expression_string() called with pointer argument"); // compile error intended here; comment on the next line shows in clang output diff --git a/include/mapnik/feature.hpp b/include/mapnik/feature.hpp index 067b34cff..46192cefd 100644 --- a/include/mapnik/feature.hpp +++ b/include/mapnik/feature.hpp @@ -48,7 +48,7 @@ namespace mapnik { class raster; class feature_impl; -typedef boost::shared_ptr raster_ptr; +typedef std::shared_ptr raster_ptr; template class context : private mapnik::noncopyable @@ -88,7 +88,7 @@ private: }; typedef context > context_type; -typedef boost::shared_ptr context_ptr; +typedef std::shared_ptr context_ptr; static const value default_value; @@ -310,7 +310,7 @@ inline std::ostream& operator<< (std::ostream & out,feature_impl const& f) // TODO - remove at Mapnik 3.x typedef feature_impl Feature; -typedef boost::shared_ptr feature_ptr; +typedef std::shared_ptr feature_ptr; } diff --git a/include/mapnik/feature_factory.hpp b/include/mapnik/feature_factory.hpp index 7896ef04b..f939c4f8f 100644 --- a/include/mapnik/feature_factory.hpp +++ b/include/mapnik/feature_factory.hpp @@ -35,11 +35,11 @@ namespace mapnik { struct feature_factory { - static boost::shared_ptr create (context_ptr const& ctx, mapnik::value_integer fid) + static std::shared_ptr create (context_ptr const& ctx, mapnik::value_integer fid) { //return boost::allocate_shared(boost::pool_allocator(),fid); //return boost::allocate_shared(boost::fast_pool_allocator(),fid); - return boost::make_shared(ctx,fid); + return std::make_shared(ctx,fid); } }; } diff --git a/include/mapnik/feature_style_processor_impl.hpp b/include/mapnik/feature_style_processor_impl.hpp index b1c1f4702..c7a8133f3 100644 --- a/include/mapnik/feature_style_processor_impl.hpp +++ b/include/mapnik/feature_style_processor_impl.hpp @@ -414,7 +414,7 @@ void feature_style_processor::apply_to_layer(layer const& lay, Proces featureset_ptr features = ds->features(q); if (features) { - boost::shared_ptr cache = boost::make_shared(); + std::shared_ptr cache = std::make_shared(); feature_ptr feature, prev; while ((feature = features->next())) { @@ -447,7 +447,7 @@ void feature_style_processor::apply_to_layer(layer const& lay, Proces else if (cache_features) { featureset_ptr features = ds->features(q); - boost::shared_ptr cache = boost::make_shared(); + std::shared_ptr cache = std::make_shared(); if (features) { feature_ptr feature; diff --git a/include/mapnik/font_engine_freetype.hpp b/include/mapnik/font_engine_freetype.hpp index 29a0bae12..85bd2c881 100644 --- a/include/mapnik/font_engine_freetype.hpp +++ b/include/mapnik/font_engine_freetype.hpp @@ -63,7 +63,7 @@ struct char_properties; class stroker; struct glyph_t; -typedef boost::shared_ptr face_ptr; +typedef std::shared_ptr face_ptr; class MAPNIK_DECL font_glyph : private mapnik::noncopyable { @@ -85,7 +85,7 @@ private: unsigned index_; }; -typedef boost::shared_ptr glyph_ptr; +typedef std::shared_ptr glyph_ptr; @@ -111,8 +111,8 @@ private: std::map dimension_cache_; }; -typedef boost::shared_ptr face_set_ptr; -typedef boost::shared_ptr stroker_ptr; +typedef std::shared_ptr face_set_ptr; +typedef std::shared_ptr stroker_ptr; class MAPNIK_DECL freetype_engine { @@ -179,7 +179,7 @@ public: face_set_ptr get_face_set(std::string const& name) { - face_set_ptr face_set = boost::make_shared(); + face_set_ptr face_set = std::make_shared(); if (face_ptr face = get_face(name)) { face_set->add(face); @@ -190,7 +190,7 @@ public: face_set_ptr get_face_set(font_set const& fset) { std::vector const& names = fset.get_face_names(); - face_set_ptr face_set = boost::make_shared(); + face_set_ptr face_set = std::make_shared(); for ( std::string const& name : names) { face_ptr face = get_face(name); diff --git a/include/mapnik/formatting/base.hpp b/include/mapnik/formatting/base.hpp index 023917326..ccb699f5e 100644 --- a/include/mapnik/formatting/base.hpp +++ b/include/mapnik/formatting/base.hpp @@ -38,7 +38,7 @@ struct char_properties; namespace formatting { class node; -typedef boost::shared_ptr node_ptr; +typedef std::shared_ptr node_ptr; class MAPNIK_DECL node { diff --git a/include/mapnik/geometry.hpp b/include/mapnik/geometry.hpp index 1db96e0c6..073439cee 100644 --- a/include/mapnik/geometry.hpp +++ b/include/mapnik/geometry.hpp @@ -153,7 +153,7 @@ public: }; typedef geometry geometry_type; -typedef boost::shared_ptr geometry_ptr; +typedef std::shared_ptr geometry_ptr; typedef boost::ptr_vector geometry_container; } diff --git a/include/mapnik/grid/grid_renderer.hpp b/include/mapnik/grid/grid_renderer.hpp index 8abf326be..fc8ad08b6 100644 --- a/include/mapnik/grid/grid_renderer.hpp +++ b/include/mapnik/grid/grid_renderer.hpp @@ -135,7 +135,7 @@ private: CoordTransform t_; freetype_engine font_engine_; face_manager font_manager_; - boost::shared_ptr detector_; + std::shared_ptr detector_; boost::scoped_ptr ras_ptr; box2d query_extent_; void setup(Map const& m); diff --git a/include/mapnik/mapped_memory_cache.hpp b/include/mapnik/mapped_memory_cache.hpp index 2526e5855..b6260d12d 100644 --- a/include/mapnik/mapped_memory_cache.hpp +++ b/include/mapnik/mapped_memory_cache.hpp @@ -37,7 +37,7 @@ namespace mapnik { -typedef boost::shared_ptr mapped_region_ptr; +typedef std::shared_ptr mapped_region_ptr; class MAPNIK_DECL mapped_memory_cache : public singleton, diff --git a/include/mapnik/marker.hpp b/include/mapnik/marker.hpp index 568f56550..c5371ef30 100644 --- a/include/mapnik/marker.hpp +++ b/include/mapnik/marker.hpp @@ -49,8 +49,8 @@ namespace mapnik typedef agg::pod_bvector attr_storage; typedef mapnik::svg::svg_storage svg_storage_type; -typedef boost::shared_ptr svg_path_ptr; -typedef boost::shared_ptr image_ptr; +typedef std::shared_ptr svg_path_ptr; +typedef std::shared_ptr image_ptr; /** * A class to hold either vector or bitmap marker data. This allows these to be treated equally * in the image caches and most of the render paths. @@ -61,7 +61,7 @@ public: marker() { // create default OGC 4x4 black pixel - bitmap_data_ = boost::optional(boost::make_shared(4,4)); + bitmap_data_ = boost::optional(std::make_shared(4,4)); (*bitmap_data_)->set(0xff000000); } diff --git a/include/mapnik/marker_cache.hpp b/include/mapnik/marker_cache.hpp index eca2decd3..00ce350bb 100644 --- a/include/mapnik/marker_cache.hpp +++ b/include/mapnik/marker_cache.hpp @@ -38,7 +38,7 @@ namespace mapnik class marker; -typedef boost::shared_ptr marker_ptr; +typedef std::shared_ptr marker_ptr; class MAPNIK_DECL marker_cache : diff --git a/include/mapnik/path_expression.hpp b/include/mapnik/path_expression.hpp index b031f4512..c13e54b50 100644 --- a/include/mapnik/path_expression.hpp +++ b/include/mapnik/path_expression.hpp @@ -38,7 +38,7 @@ struct attribute; typedef boost::variant path_component; typedef std::vector path_expression; -typedef boost::shared_ptr path_expression_ptr; +typedef std::shared_ptr path_expression_ptr; } diff --git a/include/mapnik/pool.hpp b/include/mapnik/pool.hpp index ba22cd7fa..7ed6b841f 100644 --- a/include/mapnik/pool.hpp +++ b/include/mapnik/pool.hpp @@ -45,7 +45,7 @@ namespace mapnik template class Creator> class Pool : private mapnik::noncopyable { - typedef boost::shared_ptr HolderType; + typedef std::shared_ptr HolderType; typedef std::deque ContType; Creator creator_; diff --git a/include/mapnik/raster_colorizer.hpp b/include/mapnik/raster_colorizer.hpp index 76c09fd94..2628348ef 100644 --- a/include/mapnik/raster_colorizer.hpp +++ b/include/mapnik/raster_colorizer.hpp @@ -200,7 +200,7 @@ public: //! //! \param[in, out] raster A raster stored in float32 single channel format, which gets colorized in place. //! \param[in] f The feature used to find 'NODATA' information if available - void colorize(boost::shared_ptr const& raster, feature_impl const& f) const; + void colorize(std::shared_ptr const& raster, feature_impl const& f) const; //! \brief Perform the translation of input to output @@ -227,7 +227,7 @@ private: }; -typedef boost::shared_ptr raster_colorizer_ptr; +typedef std::shared_ptr raster_colorizer_ptr; } // mapnik namespace diff --git a/include/mapnik/shield_symbolizer.hpp b/include/mapnik/shield_symbolizer.hpp index be2af2926..6b28826f2 100644 --- a/include/mapnik/shield_symbolizer.hpp +++ b/include/mapnik/shield_symbolizer.hpp @@ -38,7 +38,7 @@ namespace mapnik struct MAPNIK_DECL shield_symbolizer : public text_symbolizer, public symbolizer_with_image { - // Note - we do not use boost::make_shared below as VC2008 and VC2010 are + // Note - we do not use std::make_shared below as VC2008 and VC2010 are // not able to compile make_shared used within a constructor shield_symbolizer(text_placements_ptr placements = text_placements_ptr(new text_placements_dummy)); shield_symbolizer(expression_ptr name, diff --git a/include/mapnik/svg/output/svg_path_iterator.hpp b/include/mapnik/svg/output/svg_path_iterator.hpp index c58c2ef7a..4e7f69db9 100644 --- a/include/mapnik/svg/output/svg_path_iterator.hpp +++ b/include/mapnik/svg/output/svg_path_iterator.hpp @@ -74,7 +74,7 @@ public: path_iterator(Container const& path) : path_iterator::iterator_adaptor_(0), path_(path), - first_value_(boost::make_shared(0,0,0)) + first_value_(std::make_shared(0,0,0)) {} /*! @@ -91,7 +91,7 @@ public: explicit path_iterator(Value* first_element, Container const& path) : path_iterator::iterator_adaptor_(first_element), path_(path), - first_value_(boost::make_shared(0,0,0)) + first_value_(std::make_shared(0,0,0)) { this->increment(); } @@ -165,7 +165,7 @@ private: } Container const& path_; - boost::shared_ptr first_value_; + std::shared_ptr first_value_; }; /*! diff --git a/include/mapnik/svg/output/svg_renderer.hpp b/include/mapnik/svg/output/svg_renderer.hpp index 1e98fee09..c82078d53 100644 --- a/include/mapnik/svg/output/svg_renderer.hpp +++ b/include/mapnik/svg/output/svg_renderer.hpp @@ -161,7 +161,7 @@ private: svg::path_output_attributes path_attributes_; freetype_engine font_engine_; face_manager font_manager_; - boost::shared_ptr detector_; + std::shared_ptr detector_; svg::svg_generator generator_; box2d query_extent_; bool painted_; diff --git a/include/mapnik/symbolizer.hpp b/include/mapnik/symbolizer.hpp index 3e9f58fd3..9b6cfd2f4 100644 --- a/include/mapnik/symbolizer.hpp +++ b/include/mapnik/symbolizer.hpp @@ -45,7 +45,7 @@ namespace mapnik // TODO - move these transform declares to own header namespace detail { struct transform_node; } typedef std::vector transform_list; -typedef boost::shared_ptr transform_list_ptr; +typedef std::shared_ptr transform_list_ptr; typedef transform_list_ptr transform_type; class feature_impl; diff --git a/include/mapnik/text_path.hpp b/include/mapnik/text_path.hpp index 7ef60c83e..cb565af92 100644 --- a/include/mapnik/text_path.hpp +++ b/include/mapnik/text_path.hpp @@ -195,7 +195,7 @@ public: } }; -typedef boost::shared_ptr text_path_ptr; +typedef std::shared_ptr text_path_ptr; } #endif // MAPNIK_TEXT_PATH_HPP diff --git a/include/mapnik/text_placements/base.hpp b/include/mapnik/text_placements/base.hpp index 99a7f1cd1..df375bc92 100644 --- a/include/mapnik/text_placements/base.hpp +++ b/include/mapnik/text_placements/base.hpp @@ -70,7 +70,7 @@ public: double get_actual_minimum_padding() const { return scale_factor * properties.minimum_padding; } }; -typedef boost::shared_ptr text_placement_info_ptr; +typedef std::shared_ptr text_placement_info_ptr; /** This object handles the management of all TextSymbolizer properties. It can * be used as a base class for own objects which implement new processing @@ -108,7 +108,7 @@ public: }; /** Pointer to object of class text_placements */ -typedef boost::shared_ptr text_placements_ptr; +typedef std::shared_ptr text_placements_ptr; } //ns mapnik diff --git a/include/mapnik/text_symbolizer.hpp b/include/mapnik/text_symbolizer.hpp index 3a8945ded..b2f46ec1f 100644 --- a/include/mapnik/text_symbolizer.hpp +++ b/include/mapnik/text_symbolizer.hpp @@ -57,7 +57,7 @@ DEFINE_ENUM(halo_rasterizer_e, halo_rasterizer_enum); struct MAPNIK_DECL text_symbolizer : public symbolizer_base { - // Note - we do not use boost::make_shared below as VC2008 and VC2010 are + // Note - we do not use std::make_shared below as VC2008 and VC2010 are // not able to compile make_shared used within a constructor text_symbolizer(text_placements_ptr placements = text_placements_ptr(new text_placements_dummy)); text_symbolizer(expression_ptr name, std::string const& face_name, diff --git a/include/mapnik/transform_expression.hpp b/include/mapnik/transform_expression.hpp index 7b5b55c75..5362d5822 100644 --- a/include/mapnik/transform_expression.hpp +++ b/include/mapnik/transform_expression.hpp @@ -193,7 +193,7 @@ inline void clear(transform_node& val) typedef detail::transform_node transform_node; typedef std::vector transform_list; -typedef boost::shared_ptr transform_list_ptr; +typedef std::shared_ptr transform_list_ptr; MAPNIK_DECL std::string to_expression_string(transform_node const& node); MAPNIK_DECL std::string to_expression_string(transform_list const& list); diff --git a/plugins/input/csv/csv_datasource.cpp b/plugins/input/csv/csv_datasource.cpp index db6521115..9891aa968 100644 --- a/plugins/input/csv/csv_datasource.cpp +++ b/plugins/input/csv/csv_datasource.cpp @@ -73,7 +73,7 @@ csv_datasource::csv_datasource(parameters const& params) manual_headers_(mapnik::util::trim_copy(*params.get("headers", ""))), strict_(*params.get("strict", false)), filesize_max_(*params.get("filesize_max", 20.0)), // MB - ctx_(boost::make_shared()) + ctx_(std::make_shared()) { /* TODO: general: @@ -938,7 +938,7 @@ mapnik::featureset_ptr csv_datasource::features(mapnik::query const& q) const } ++pos; } - return boost::make_shared(q.get_bbox(),features_); + return std::make_shared(q.get_bbox(),features_); } mapnik::featureset_ptr csv_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const diff --git a/plugins/input/gdal/gdal_datasource.cpp b/plugins/input/gdal/gdal_datasource.cpp index ceb6fc86d..841d62631 100644 --- a/plugins/input/gdal/gdal_datasource.cpp +++ b/plugins/input/gdal/gdal_datasource.cpp @@ -217,7 +217,7 @@ featureset_ptr gdal_datasource::features(query const& q) const gdal_query gq = q; - // TODO - move to boost::make_shared, but must reduce # of args to <= 9 + // TODO - move to std::make_shared, but must reduce # of args to <= 9 return featureset_ptr(new gdal_featureset(*open_dataset(), band_, gq, @@ -238,7 +238,7 @@ featureset_ptr gdal_datasource::features_at_point(coord2d const& pt, double tol) gdal_query gq = pt; - // TODO - move to boost::make_shared, but must reduce # of args to <= 9 + // TODO - move to std::make_shared, but must reduce # of args to <= 9 return featureset_ptr(new gdal_featureset(*open_dataset(), band_, gq, diff --git a/plugins/input/gdal/gdal_featureset.cpp b/plugins/input/gdal/gdal_featureset.cpp index f0804fcbd..642ca2eda 100644 --- a/plugins/input/gdal/gdal_featureset.cpp +++ b/plugins/input/gdal/gdal_featureset.cpp @@ -63,7 +63,7 @@ gdal_featureset::gdal_featureset(GDALDataset& dataset, double dy, boost::optional const& nodata) : dataset_(dataset), - ctx_(boost::make_shared()), + ctx_(std::make_shared()), band_(band), gquery_(q), raster_extent_(extent), @@ -215,7 +215,7 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q) if (im_width > 0 && im_height > 0) { - mapnik::raster_ptr raster = boost::make_shared(intersect, im_width, im_height); + mapnik::raster_ptr raster = std::make_shared(intersect, im_width, im_height); feature->set_raster(raster); mapnik::image_data_32 & image = raster->data_; image.set(0xffffffff); diff --git a/plugins/input/geojson/geojson_datasource.cpp b/plugins/input/geojson/geojson_datasource.cpp index 62c93a8ea..87c9185b9 100644 --- a/plugins/input/geojson/geojson_datasource.cpp +++ b/plugins/input/geojson/geojson_datasource.cpp @@ -130,7 +130,7 @@ geojson_datasource::geojson_datasource(parameters const& params) boost::spirit::multi_pass end = boost::spirit::make_default_multi_pass(base_iterator_type()); - mapnik::context_ptr ctx = boost::make_shared(); + mapnik::context_ptr ctx = std::make_shared(); mapnik::json::feature_collection_parser > p(ctx,*tr_); bool result = p.parse(begin,end, features_); if (!result) @@ -215,7 +215,7 @@ mapnik::featureset_ptr geojson_datasource::features(mapnik::query const& q) cons { box_type box(point_type(b.minx(),b.miny()),point_type(b.maxx(),b.maxy())); index_array_ = tree_.find(box); - return boost::make_shared(features_, index_array_.begin(), index_array_.end()); + return std::make_shared(features_, index_array_.begin(), index_array_.end()); } // otherwise return an empty featureset pointer return mapnik::featureset_ptr(); diff --git a/plugins/input/geojson/geojson_datasource.hpp b/plugins/input/geojson/geojson_datasource.hpp index 7cad44b08..131750c87 100644 --- a/plugins/input/geojson/geojson_datasource.hpp +++ b/plugins/input/geojson/geojson_datasource.hpp @@ -54,7 +54,7 @@ public: typedef boost::geometry::model::d2::point_xy point_type; typedef boost::geometry::model::box box_type; typedef boost::geometry::index::rtree spatial_index_type; - + // constructor geojson_datasource(mapnik::parameters const& params); virtual ~geojson_datasource (); @@ -71,7 +71,7 @@ private: mapnik::layer_descriptor desc_; std::string file_; mapnik::box2d extent_; - boost::shared_ptr tr_; + std::shared_ptr tr_; std::vector features_; spatial_index_type tree_; mutable std::deque index_array_; diff --git a/plugins/input/occi/occi_datasource.cpp b/plugins/input/occi/occi_datasource.cpp index 6111c7049..1815efbad 100644 --- a/plugins/input/occi/occi_datasource.cpp +++ b/plugins/input/occi/occi_datasource.cpp @@ -523,7 +523,7 @@ featureset_ptr occi_datasource::features(query const& q) const std::set const& props = q.property_names(); std::set::const_iterator pos = props.begin(); std::set::const_iterator end = props.end(); - mapnik::context_ptr ctx = boost::make_shared(); + mapnik::context_ptr ctx = std::make_shared(); for (; pos != end; ++pos) { s << ", " << *pos; @@ -562,7 +562,7 @@ featureset_ptr occi_datasource::features(query const& q) const MAPNIK_LOG_DEBUG(occi) << "occi_datasource: " << s.str(); - return boost::make_shared(pool_, + return std::make_shared(pool_, conn_, ctx, s.str(), @@ -590,7 +590,7 @@ featureset_ptr occi_datasource::features_at_point(coord2d const& pt, double tol) } std::vector::const_iterator itr = desc_.get_descriptors().begin(); std::vector::const_iterator end = desc_.get_descriptors().end(); - mapnik::context_ptr ctx = boost::make_shared(); + mapnik::context_ptr ctx = std::make_shared(); while (itr != end) { s << ", " << itr->get_name(); @@ -631,7 +631,7 @@ featureset_ptr occi_datasource::features_at_point(coord2d const& pt, double tol) MAPNIK_LOG_DEBUG(occi) << "occi_datasource: " << s.str(); - return boost::make_shared(pool_, + return std::make_shared(pool_, conn_, ctx, s.str(), diff --git a/plugins/input/ogr/ogr_datasource.cpp b/plugins/input/ogr/ogr_datasource.cpp index dd8a62307..4d686c407 100644 --- a/plugins/input/ogr/ogr_datasource.cpp +++ b/plugins/input/ogr/ogr_datasource.cpp @@ -478,7 +478,7 @@ featureset_ptr ogr_datasource::features(query const& q) const std::vector const& desc_ar = desc_.get_descriptors(); // feature context (schema) - mapnik::context_ptr ctx = boost::make_shared(); + mapnik::context_ptr ctx = std::make_shared(); std::vector::const_iterator itr = desc_ar.begin(); std::vector::const_iterator end = desc_ar.end(); @@ -521,7 +521,7 @@ featureset_ptr ogr_datasource::features_at_point(coord2d const& pt, double tol) { std::vector const& desc_ar = desc_.get_descriptors(); // feature context (schema) - mapnik::context_ptr ctx = boost::make_shared(); + mapnik::context_ptr ctx = std::make_shared(); std::vector::const_iterator itr = desc_ar.begin(); std::vector::const_iterator end = desc_ar.end(); diff --git a/plugins/input/osm/osm_datasource.cpp b/plugins/input/osm/osm_datasource.cpp index 6b46bef05..9db56a458 100644 --- a/plugins/input/osm/osm_datasource.cpp +++ b/plugins/input/osm/osm_datasource.cpp @@ -134,7 +134,7 @@ featureset_ptr osm_datasource::features(const query& q) const filter_in_box filter(q.get_bbox()); // so we need to filter osm features by bbox here... - return boost::make_shared >(filter, + return std::make_shared >(filter, osm_data_, q.property_names(), desc_.get_encoding()); @@ -155,7 +155,7 @@ featureset_ptr osm_datasource::features_at_point(coord2d const& pt, double tol) ++itr; } - return boost::make_shared >(filter, + return std::make_shared >(filter, osm_data_, names, desc_.get_encoding()); diff --git a/plugins/input/osm/osm_featureset.cpp b/plugins/input/osm/osm_featureset.cpp index db0f62255..be60826bc 100644 --- a/plugins/input/osm/osm_featureset.cpp +++ b/plugins/input/osm/osm_featureset.cpp @@ -48,7 +48,7 @@ osm_featureset::osm_featureset(const filterT& filter, tr_(new transcoder(encoding)), dataset_ (dataset), attribute_names_ (attribute_names), - ctx_(boost::make_shared()) + ctx_(std::make_shared()) { dataset_->rewind(); } diff --git a/plugins/input/postgis/connection.hpp b/plugins/input/postgis/connection.hpp index d8726aef0..afab42934 100644 --- a/plugins/input/postgis/connection.hpp +++ b/plugins/input/postgis/connection.hpp @@ -89,7 +89,7 @@ public: return ok; } - boost::shared_ptr executeQuery(std::string const& sql, int type = 0) const + std::shared_ptr executeQuery(std::string const& sql, int type = 0) const { #ifdef MAPNIK_STATS mapnik::progress_timer __stats__(std::clog, std::string("postgis_connection::execute_query ") + sql); @@ -119,7 +119,7 @@ public: throw mapnik::datasource_exception(err_msg); } - return boost::make_shared(result); + return std::make_shared(result); } std::string status() const diff --git a/plugins/input/postgis/connection_manager.hpp b/plugins/input/postgis/connection_manager.hpp index 4fbcce2d6..30a15abb1 100644 --- a/plugins/input/postgis/connection_manager.hpp +++ b/plugins/input/postgis/connection_manager.hpp @@ -103,8 +103,8 @@ class ConnectionManager : public singleton friend class CreateStatic; typedef Pool PoolType; - typedef std::map > ContType; - typedef boost::shared_ptr HolderType; + typedef std::map > ContType; + typedef std::shared_ptr HolderType; ContType pools_; public: @@ -122,20 +122,20 @@ public: { return pools_.insert( std::make_pair(creator.id(), - boost::make_shared(creator,initialSize,maxSize))).second; + std::make_shared(creator,initialSize,maxSize))).second; } return false; } - boost::shared_ptr getPool(std::string const& key) + std::shared_ptr getPool(std::string const& key) { ContType::const_iterator itr=pools_.find(key); if (itr!=pools_.end()) { return itr->second; } - static const boost::shared_ptr emptyPool; + static const std::shared_ptr emptyPool; return emptyPool; } diff --git a/plugins/input/postgis/cursorresultset.hpp b/plugins/input/postgis/cursorresultset.hpp index 611e394f8..707a7afd5 100644 --- a/plugins/input/postgis/cursorresultset.hpp +++ b/plugins/input/postgis/cursorresultset.hpp @@ -31,7 +31,7 @@ class CursorResultSet : public IResultSet { public: - CursorResultSet(boost::shared_ptr const &conn, std::string cursorName, int fetch_count) + CursorResultSet(std::shared_ptr const &conn, std::string cursorName, int fetch_count) : conn_(conn), cursorName_(cursorName), fetch_size_(fetch_count), @@ -166,9 +166,9 @@ private: MAPNIK_LOG_DEBUG(postgis) << "postgis_cursor_resultset: FETCH result (" << cursorName_ << "): " << rs_->size() << " rows"; } - boost::shared_ptr conn_; + std::shared_ptr conn_; std::string cursorName_; - boost::shared_ptr rs_; + std::shared_ptr rs_; int fetch_size_; bool is_closed_; int *refCount_; diff --git a/plugins/input/postgis/postgis_datasource.cpp b/plugins/input/postgis/postgis_datasource.cpp index 4b3be44ce..36411c0ae 100644 --- a/plugins/input/postgis/postgis_datasource.cpp +++ b/plugins/input/postgis/postgis_datasource.cpp @@ -51,7 +51,7 @@ const double postgis_datasource::FMAX = std::numeric_limits::max(); const std::string postgis_datasource::GEOMETRY_COLUMNS = "geometry_columns"; const std::string postgis_datasource::SPATIAL_REF_SYS = "spatial_ref_system"; -using boost::shared_ptr; +using std::shared_ptr; using mapnik::attribute_descriptor; postgis_datasource::postgis_datasource(parameters const& params) @@ -557,7 +557,7 @@ std::string postgis_datasource::populate_tokens(std::string const& sql, double s } -boost::shared_ptr postgis_datasource::get_resultset(boost::shared_ptr const &conn, std::string const& sql) const +std::shared_ptr postgis_datasource::get_resultset(std::shared_ptr const &conn, std::string const& sql) const { if (cursor_fetch_size_ > 0) { @@ -573,7 +573,7 @@ boost::shared_ptr postgis_datasource::get_resultset(boost::shared_pt throw mapnik::datasource_exception("Postgis Plugin: error creating cursor for data select." ); } - return boost::make_shared(conn, cursor_name, cursor_fetch_size_); + return std::make_shared(conn, cursor_name, cursor_fetch_size_); } else @@ -643,7 +643,7 @@ featureset_ptr postgis_datasource::features(const query& q) const s << ") AS geom"; - mapnik::context_ptr ctx = boost::make_shared(); + mapnik::context_ptr ctx = std::make_shared(); std::set const& props = q.property_names(); std::set::const_iterator pos = props.begin(); std::set::const_iterator end = props.end(); @@ -680,8 +680,8 @@ featureset_ptr postgis_datasource::features(const query& q) const s << " LIMIT " << row_limit_; } - boost::shared_ptr rs = get_resultset(conn, s.str()); - return boost::make_shared(rs, ctx, desc_.get_encoding(), !key_field_.empty()); + std::shared_ptr rs = get_resultset(conn, s.str()); + return std::make_shared(rs, ctx, desc_.get_encoding(), !key_field_.empty()); } else { @@ -739,7 +739,7 @@ featureset_ptr postgis_datasource::features_at_point(coord2d const& pt, double t std::ostringstream s; s << "SELECT ST_AsBinary(\"" << geometryColumn_ << "\") AS geom"; - mapnik::context_ptr ctx = boost::make_shared(); + mapnik::context_ptr ctx = std::make_shared(); std::vector::const_iterator itr = desc_.get_descriptors().begin(); std::vector::const_iterator end = desc_.get_descriptors().end(); @@ -775,8 +775,8 @@ featureset_ptr postgis_datasource::features_at_point(coord2d const& pt, double t s << " LIMIT " << row_limit_; } - boost::shared_ptr rs = get_resultset(conn, s.str()); - return boost::make_shared(rs, ctx, desc_.get_encoding(), !key_field_.empty()); + std::shared_ptr rs = get_resultset(conn, s.str()); + return std::make_shared(rs, ctx, desc_.get_encoding(), !key_field_.empty()); } } diff --git a/plugins/input/postgis/postgis_datasource.hpp b/plugins/input/postgis/postgis_datasource.hpp index d0f5a2beb..3f1ea34ee 100644 --- a/plugins/input/postgis/postgis_datasource.hpp +++ b/plugins/input/postgis/postgis_datasource.hpp @@ -74,7 +74,7 @@ private: std::string sql_bbox(box2d const& env) const; std::string populate_tokens(std::string const& sql, double scale_denom, box2d const& env, double pixel_width, double pixel_height) const; std::string populate_tokens(std::string const& sql) const; - boost::shared_ptr get_resultset(boost::shared_ptr const &conn, std::string const& sql) const; + std::shared_ptr get_resultset(std::shared_ptr const &conn, std::string const& sql) const; static const std::string GEOMETRY_COLUMNS; static const std::string SPATIAL_REF_SYS; diff --git a/plugins/input/postgis/postgis_featureset.cpp b/plugins/input/postgis/postgis_featureset.cpp index d23c8edba..0e1f9e50e 100644 --- a/plugins/input/postgis/postgis_featureset.cpp +++ b/plugins/input/postgis/postgis_featureset.cpp @@ -50,7 +50,7 @@ using mapnik::geometry_utils; using mapnik::feature_factory; using mapnik::context_ptr; -postgis_featureset::postgis_featureset(boost::shared_ptr const& rs, +postgis_featureset::postgis_featureset(std::shared_ptr const& rs, context_ptr const& ctx, std::string const& encoding, bool key_field) diff --git a/plugins/input/postgis/postgis_featureset.hpp b/plugins/input/postgis/postgis_featureset.hpp index 69f1963f1..3ea082394 100644 --- a/plugins/input/postgis/postgis_featureset.hpp +++ b/plugins/input/postgis/postgis_featureset.hpp @@ -43,7 +43,7 @@ class IResultSet; class postgis_featureset : public mapnik::Featureset { public: - postgis_featureset(boost::shared_ptr const& rs, + postgis_featureset(std::shared_ptr const& rs, context_ptr const& ctx, std::string const& encoding, bool key_field = false); @@ -51,7 +51,7 @@ public: ~postgis_featureset(); private: - boost::shared_ptr rs_; + std::shared_ptr rs_; context_ptr ctx_; boost::scoped_ptr tr_; unsigned totalGeomSize_; diff --git a/plugins/input/python/python_datasource.cpp b/plugins/input/python/python_datasource.cpp index 904027de8..bc490384a 100644 --- a/plugins/input/python/python_datasource.cpp +++ b/plugins/input/python/python_datasource.cpp @@ -202,7 +202,7 @@ mapnik::featureset_ptr python_datasource::features(mapnik::query const& q) const { return mapnik::featureset_ptr(); } - return boost::make_shared(features); + return std::make_shared(features); } // otherwise return an empty featureset pointer return mapnik::featureset_ptr(); @@ -226,7 +226,7 @@ mapnik::featureset_ptr python_datasource::features_at_point(mapnik::coord2d cons return mapnik::featureset_ptr(); } // otherwise, return a feature set which can iterate over the iterator - return boost::make_shared(features); + return std::make_shared(features); } catch ( boost::python::error_already_set ) { diff --git a/plugins/input/raster/raster_datasource.cpp b/plugins/input/raster/raster_datasource.cpp index 3248b527a..3ba2a43e3 100644 --- a/plugins/input/raster/raster_datasource.cpp +++ b/plugins/input/raster/raster_datasource.cpp @@ -189,7 +189,7 @@ featureset_ptr raster_datasource::features(query const& q) const tiled_multi_file_policy policy(filename_, format_, tile_size_, extent_, q.get_bbox(), width_, height_, tile_stride_); - return boost::make_shared >(policy, extent_, q); + return std::make_shared >(policy, extent_, q); } else if (width * height > static_cast(tile_size_ * tile_size_ << 2)) { @@ -197,7 +197,7 @@ featureset_ptr raster_datasource::features(query const& q) const tiled_file_policy policy(filename_, format_, tile_size_, extent_, q.get_bbox(), width_, height_); - return boost::make_shared >(policy, extent_, q); + return std::make_shared >(policy, extent_, q); } else { @@ -206,7 +206,7 @@ featureset_ptr raster_datasource::features(query const& q) const raster_info info(filename_, format_, extent_, width_, height_); single_file_policy policy(info); - return boost::make_shared >(policy, extent_, q); + return std::make_shared >(policy, extent_, q); } } diff --git a/plugins/input/raster/raster_featureset.cpp b/plugins/input/raster/raster_featureset.cpp index 0e565a9d0..370d497ce 100644 --- a/plugins/input/raster/raster_featureset.cpp +++ b/plugins/input/raster/raster_featureset.cpp @@ -49,7 +49,7 @@ raster_featureset::raster_featureset(LookupPolicy const& policy, query const& q) : policy_(policy), feature_id_(1), - ctx_(boost::make_shared()), + ctx_(std::make_shared()), extent_(extent), bbox_(q.get_bbox()), curIter_(policy_.begin()), @@ -114,7 +114,7 @@ feature_ptr raster_featureset::next() rem.maxy() + y_off + height); intersect = t.backward(feature_raster_extent); - mapnik::raster_ptr raster = boost::make_shared(intersect, width, height); + mapnik::raster_ptr raster = std::make_shared(intersect, width, height); reader->read(x_off, y_off, raster->data_); raster->premultiplied_alpha_ = reader->premultiplied_alpha(); feature->set_raster(raster); diff --git a/plugins/input/rasterlite/rasterlite_datasource.cpp b/plugins/input/rasterlite/rasterlite_datasource.cpp index 7b9d67861..ecc9d9af9 100644 --- a/plugins/input/rasterlite/rasterlite_datasource.cpp +++ b/plugins/input/rasterlite/rasterlite_datasource.cpp @@ -182,12 +182,11 @@ layer_descriptor rasterlite_datasource::get_descriptor() const featureset_ptr rasterlite_datasource::features(query const& q) const { rasterlite_query gq = q; - return boost::make_shared(open_dataset(), gq); + return std::make_shared(open_dataset(), gq); } featureset_ptr rasterlite_datasource::features_at_point(coord2d const& pt, double tol) const { rasterlite_query gq = pt; - return boost::make_shared(open_dataset(), gq); + return std::make_shared(open_dataset(), gq); } - diff --git a/plugins/input/rasterlite/rasterlite_featureset.cpp b/plugins/input/rasterlite/rasterlite_featureset.cpp index 7eb7a0ee7..52554d7aa 100644 --- a/plugins/input/rasterlite/rasterlite_featureset.cpp +++ b/plugins/input/rasterlite/rasterlite_featureset.cpp @@ -48,7 +48,7 @@ rasterlite_featureset::rasterlite_featureset(void* dataset, : dataset_(dataset), gquery_(q), first_(true), - ctx_(boost::make_shared()) + ctx_(std::make_shared()) { rasterliteSetBackgroundColor(dataset_, 255, 0, 255); rasterliteSetTransparentColor(dataset_, 255, 0, 255); @@ -129,7 +129,7 @@ feature_ptr rasterlite_featureset::get_feature(mapnik::query const& q) { if (size > 0) { - mapnik::raster_ptr rasterp = boost::make_shared(intersect, width, height); + mapnik::raster_ptr rasterp = std::make_shared(intersect, width, height); mapnik::image_data_32 & image = rasterp->data_; image.set(0xffffffff); diff --git a/plugins/input/shape/shape_datasource.cpp b/plugins/input/shape/shape_datasource.cpp index f147bb5a9..3077b7440 100644 --- a/plugins/input/shape/shape_datasource.cpp +++ b/plugins/input/shape/shape_datasource.cpp @@ -96,7 +96,7 @@ shape_datasource::shape_datasource(const parameters ¶ms) mapnik::progress_timer __stats2__(std::clog, "shape_datasource::init(get_column_description)"); #endif - boost::shared_ptr shape_ref = boost::make_shared(shape_name_); + std::shared_ptr shape_ref = std::make_shared(shape_name_); init(*shape_ref); for (int i=0;idbf().num_fields();++i) { @@ -237,7 +237,7 @@ featureset_ptr shape_datasource::features(const query& q) const if (indexed_) { shape_->shp().seek(0); - // TODO - use boost::make_shared - #760 + // TODO - use std::make_shared - #760 return featureset_ptr (new shape_index_featureset(filter, *shape_, @@ -248,7 +248,7 @@ featureset_ptr shape_datasource::features(const query& q) const } else { - return boost::make_shared >(filter, + return std::make_shared >(filter, shape_name_, q.property_names(), desc_.get_encoding(), @@ -279,7 +279,7 @@ featureset_ptr shape_datasource::features_at_point(coord2d const& pt, double tol if (indexed_) { shape_->shp().seek(0); - // TODO - use boost::make_shared - #760 + // TODO - use std::make_shared - #760 return featureset_ptr (new shape_index_featureset(filter, *shape_, @@ -290,7 +290,7 @@ featureset_ptr shape_datasource::features_at_point(coord2d const& pt, double tol } else { - return boost::make_shared >(filter, + return std::make_shared >(filter, shape_name_, names, desc_.get_encoding(), diff --git a/plugins/input/shape/shape_datasource.hpp b/plugins/input/shape/shape_datasource.hpp index 9f98e3065..acb2cf32f 100644 --- a/plugins/input/shape/shape_datasource.hpp +++ b/plugins/input/shape/shape_datasource.hpp @@ -68,7 +68,7 @@ private: datasource::datasource_t type_; std::string shape_name_; - boost::shared_ptr shape_; + std::shared_ptr shape_; shape_io::shapeType shape_type_; long file_length_; box2d extent_; diff --git a/plugins/input/shape/shape_featureset.cpp b/plugins/input/shape/shape_featureset.cpp index cce768704..540f58d0f 100644 --- a/plugins/input/shape/shape_featureset.cpp +++ b/plugins/input/shape/shape_featureset.cpp @@ -53,7 +53,7 @@ shape_featureset::shape_featureset(filterT const& filter, file_length_(file_length), row_limit_(row_limit), count_(0), - ctx_(boost::make_shared()) + ctx_(std::make_shared()) { shape_.shp().skip(100); setup_attributes(ctx_, attribute_names, shape_name, shape_,attr_ids_); diff --git a/plugins/input/shape/shape_index_featureset.cpp b/plugins/input/shape/shape_index_featureset.cpp index c896b9208..5b402c9f5 100644 --- a/plugins/input/shape/shape_index_featureset.cpp +++ b/plugins/input/shape/shape_index_featureset.cpp @@ -49,7 +49,7 @@ shape_index_featureset::shape_index_featureset(filterT const& filter, std::string const& shape_name, int row_limit) : filter_(filter), - ctx_(boost::make_shared()), + ctx_(std::make_shared()), shape_(shape), tr_(new mapnik::transcoder(encoding)), row_limit_(row_limit), @@ -59,7 +59,7 @@ shape_index_featureset::shape_index_featureset(filterT const& filter, shape_.shp().skip(100); setup_attributes(ctx_, attribute_names, shape_name, shape_,attr_ids_); - boost::shared_ptr index = shape_.index(); + std::shared_ptr index = shape_.index(); if (index) { #ifdef SHAPE_MEMORY_MAPPED_FILE diff --git a/plugins/input/shape/shape_io.cpp b/plugins/input/shape/shape_io.cpp index cceb7198e..a2c9ce680 100644 --- a/plugins/input/shape/shape_io.cpp +++ b/plugins/input/shape/shape_io.cpp @@ -53,7 +53,7 @@ shape_io::shape_io(std::string const& shape_name, bool open_index) { try { - index_= boost::make_shared(shape_name + INDEX); + index_= std::make_shared(shape_name + INDEX); } catch (...) { diff --git a/plugins/input/shape/shape_io.hpp b/plugins/input/shape/shape_io.hpp index 34d091f8f..3cb5e1831 100644 --- a/plugins/input/shape/shape_io.hpp +++ b/plugins/input/shape/shape_io.hpp @@ -61,7 +61,7 @@ public: shape_file& shp(); dbf_file& dbf(); - inline boost::shared_ptr& index() + inline std::shared_ptr& index() { return index_; } @@ -79,7 +79,7 @@ public: shapeType type_; shape_file shp_; dbf_file dbf_; - boost::shared_ptr index_; + std::shared_ptr index_; unsigned reclength_; unsigned id_; box2d cur_extent_; diff --git a/plugins/input/sqlite/sqlite_connection.hpp b/plugins/input/sqlite/sqlite_connection.hpp index 54908434b..c095bbb85 100644 --- a/plugins/input/sqlite/sqlite_connection.hpp +++ b/plugins/input/sqlite/sqlite_connection.hpp @@ -116,7 +116,7 @@ public: throw mapnik::datasource_exception (s.str()); } - boost::shared_ptr execute_query(std::string const& sql) + std::shared_ptr execute_query(std::string const& sql) { #ifdef MAPNIK_STATS mapnik::progress_timer __stats__(std::clog, std::string("sqlite_resultset::execute_query ") + sql); @@ -129,7 +129,7 @@ public: throw_sqlite_error(sql); } - return boost::make_shared(stmt); + return std::make_shared(stmt); } void execute(std::string const& sql) diff --git a/plugins/input/sqlite/sqlite_datasource.cpp b/plugins/input/sqlite/sqlite_datasource.cpp index f8e6e8da1..a4705e8b4 100644 --- a/plugins/input/sqlite/sqlite_datasource.cpp +++ b/plugins/input/sqlite/sqlite_datasource.cpp @@ -139,7 +139,7 @@ sqlite_datasource::sqlite_datasource(parameters const& params) } // now actually create the connection and start executing setup sql - dataset_ = boost::make_shared(dataset_name_); + dataset_ = std::make_shared(dataset_name_); boost::optional table_by_index = params.get("table_by_index"); @@ -300,7 +300,7 @@ sqlite_datasource::sqlite_datasource(parameters const& params) mapnik::progress_timer __stats2__(std::clog, "sqlite_datasource::init(create_spatial_index)"); #endif - boost::shared_ptr rs = dataset_->execute_query(query.str()); + std::shared_ptr rs = dataset_->execute_query(query.str()); if (sqlite_utils::create_spatial_index(index_db,index_table_,rs)) { //extent_initialized_ = true; @@ -437,7 +437,7 @@ boost::optional sqlite_datasource::get_geometry_ { s << " LIMIT 5"; } - boost::shared_ptr rs = dataset_->execute_query(s.str()); + std::shared_ptr rs = dataset_->execute_query(s.str()); int multi_type = 0; while (rs->is_valid() && rs->step_next()) { @@ -483,7 +483,7 @@ featureset_ptr sqlite_datasource::features(query const& q) const mapnik::box2d const& e = q.get_bbox(); std::ostringstream s; - mapnik::context_ptr ctx = boost::make_shared(); + mapnik::context_ptr ctx = std::make_shared(); s << "SELECT " << geometry_field_; if (!key_field_.empty()) @@ -536,9 +536,9 @@ featureset_ptr sqlite_datasource::features(query const& q) const MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: " << s.str(); - boost::shared_ptr rs(dataset_->execute_query(s.str())); + std::shared_ptr rs(dataset_->execute_query(s.str())); - return boost::make_shared(rs, + return std::make_shared(rs, ctx, desc_.get_encoding(), e, @@ -561,7 +561,7 @@ featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double to mapnik::box2d e(pt.x, pt.y, pt.x, pt.y); e.pad(tol); std::ostringstream s; - mapnik::context_ptr ctx = boost::make_shared(); + mapnik::context_ptr ctx = std::make_shared(); s << "SELECT " << geometry_field_; if (!key_field_.empty()) @@ -617,9 +617,9 @@ featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double to MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: " << s.str(); - boost::shared_ptr rs(dataset_->execute_query(s.str())); + std::shared_ptr rs(dataset_->execute_query(s.str())); - return boost::make_shared(rs, + return std::make_shared(rs, ctx, desc_.get_encoding(), e, diff --git a/plugins/input/sqlite/sqlite_datasource.hpp b/plugins/input/sqlite/sqlite_datasource.hpp index 516d632f6..27c22ff33 100644 --- a/plugins/input/sqlite/sqlite_datasource.hpp +++ b/plugins/input/sqlite/sqlite_datasource.hpp @@ -68,7 +68,7 @@ private: bool extent_initialized_; mapnik::datasource::datasource_t type_; std::string dataset_name_; - boost::shared_ptr dataset_; + std::shared_ptr dataset_; std::string table_; std::string fields_; std::string metadata_; diff --git a/plugins/input/sqlite/sqlite_featureset.cpp b/plugins/input/sqlite/sqlite_featureset.cpp index 56b59effb..11530809d 100644 --- a/plugins/input/sqlite/sqlite_featureset.cpp +++ b/plugins/input/sqlite/sqlite_featureset.cpp @@ -43,7 +43,7 @@ using mapnik::geometry_utils; using mapnik::transcoder; using mapnik::feature_factory; -sqlite_featureset::sqlite_featureset(boost::shared_ptr rs, +sqlite_featureset::sqlite_featureset(std::shared_ptr rs, mapnik::context_ptr const& ctx, std::string const& encoding, mapnik::box2d const& bbox, diff --git a/plugins/input/sqlite/sqlite_featureset.hpp b/plugins/input/sqlite/sqlite_featureset.hpp index 9fc5356a7..3e52b4e85 100644 --- a/plugins/input/sqlite/sqlite_featureset.hpp +++ b/plugins/input/sqlite/sqlite_featureset.hpp @@ -39,7 +39,7 @@ class sqlite_featureset : public mapnik::Featureset { public: - sqlite_featureset(boost::shared_ptr rs, + sqlite_featureset(std::shared_ptr rs, mapnik::context_ptr const& ctx, std::string const& encoding, mapnik::box2d const& bbox, @@ -50,7 +50,7 @@ public: mapnik::feature_ptr next(); private: - boost::shared_ptr rs_; + std::shared_ptr rs_; mapnik::context_ptr ctx_; boost::scoped_ptr tr_; mapnik::box2d bbox_; diff --git a/plugins/input/sqlite/sqlite_prepared.hpp b/plugins/input/sqlite/sqlite_prepared.hpp index f10ad7288..de7e31c35 100644 --- a/plugins/input/sqlite/sqlite_prepared.hpp +++ b/plugins/input/sqlite/sqlite_prepared.hpp @@ -47,7 +47,7 @@ class prepared_index_statement : mapnik::noncopyable { public: - prepared_index_statement(boost::shared_ptr ds, std::string const& sql) + prepared_index_statement(std::shared_ptr ds, std::string const& sql) : ds_(ds), stmt_(0) { @@ -133,7 +133,7 @@ public: } private: - boost::shared_ptr ds_; + std::shared_ptr ds_; sqlite3_stmt * stmt_; }; diff --git a/plugins/input/sqlite/sqlite_utils.hpp b/plugins/input/sqlite/sqlite_utils.hpp index b3cc4c025..3ccd72202 100644 --- a/plugins/input/sqlite/sqlite_utils.hpp +++ b/plugins/input/sqlite/sqlite_utils.hpp @@ -146,7 +146,7 @@ public: return false; } - static void get_tables(boost::shared_ptr ds, + static void get_tables(std::shared_ptr ds, std::vector & tables) { std::ostringstream sql; @@ -165,7 +165,7 @@ public: const int rc = sqlite3_prepare_v2 (*(*ds), sql.str().c_str(), -1, &stmt, 0); if (rc == SQLITE_OK) { - boost::shared_ptr rs = boost::make_shared(stmt); + std::shared_ptr rs = std::make_shared(stmt); while (rs->is_valid() && rs->step_next()) { const int type_oid = rs->column_type(0); @@ -181,7 +181,7 @@ public: } } - static void query_extent(boost::shared_ptr rs, + static void query_extent(std::shared_ptr rs, mapnik::box2d& extent) { @@ -218,7 +218,7 @@ public: static bool create_spatial_index(std::string const& index_db, std::string const& index_table, - boost::shared_ptr rs) + std::shared_ptr rs) { /* TODO - speedups @@ -236,7 +236,7 @@ public: #endif bool existed = mapnik::util::exists(index_db); - boost::shared_ptr ds = boost::make_shared(index_db,flags); + std::shared_ptr ds = std::make_shared(index_db,flags); bool one_success = false; try @@ -356,7 +356,7 @@ public: mapnik::box2d bbox; } rtree_type; - static void build_tree(boost::shared_ptr rs, + static void build_tree(std::shared_ptr rs, std::vector & rtree_list) { @@ -414,8 +414,8 @@ public: #endif bool existed = mapnik::util::exists(index_db);; - - boost::shared_ptr ds = boost::make_shared(index_db,flags); + + std::shared_ptr ds = std::make_shared(index_db,flags); bool one_success = false; try @@ -484,7 +484,7 @@ public: return false; } - static bool detect_extent(boost::shared_ptr ds, + static bool detect_extent(std::shared_ptr ds, bool has_spatial_index, mapnik::box2d & extent, std::string const& index_table, @@ -501,7 +501,7 @@ public: s << "SELECT xmin, ymin, xmax, ymax FROM " << metadata; s << " WHERE LOWER(f_table_name) = LOWER('" << geometry_table << "')"; MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: executing: '" << s.str() << "'"; - boost::shared_ptr rs(ds->execute_query(s.str())); + std::shared_ptr rs(ds->execute_query(s.str())); if (rs->is_valid() && rs->step_next()) { double xmin = rs->column_double(0); @@ -518,7 +518,7 @@ public: s << "SELECT MIN(xmin), MIN(ymin), MAX(xmax), MAX(ymax) FROM " << index_table; MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: executing: '" << s.str() << "'"; - boost::shared_ptr rs(ds->execute_query(s.str())); + std::shared_ptr rs(ds->execute_query(s.str())); if (rs->is_valid() && rs->step_next()) { if (! rs->column_isnull(0)) @@ -539,20 +539,20 @@ public: s << "SELECT " << geometry_field << "," << key_field << " FROM (" << table << ")"; MAPNIK_LOG_DEBUG(sqlite) << "sqlite_datasource: executing: '" << s.str() << "'"; - boost::shared_ptr rs(ds->execute_query(s.str())); + std::shared_ptr rs(ds->execute_query(s.str())); sqlite_utils::query_extent(rs,extent); return true; } return false; } - static bool has_rtree(std::string const& index_table,boost::shared_ptr ds) + static bool has_rtree(std::string const& index_table,std::shared_ptr ds) { try { std::ostringstream s; s << "SELECT pkid,xmin,xmax,ymin,ymax FROM " << index_table << " LIMIT 1"; - boost::shared_ptr rs = ds->execute_query(s.str()); + std::shared_ptr rs = ds->execute_query(s.str()); if (rs->is_valid() && rs->step_next()) { return true; @@ -569,10 +569,10 @@ public: static bool detect_types_from_subquery(std::string const& query, std::string & geometry_field, mapnik::layer_descriptor & desc, - boost::shared_ptr ds) + std::shared_ptr ds) { bool found = false; - boost::shared_ptr rs(ds->execute_query(query)); + std::shared_ptr rs(ds->execute_query(query)); if (rs->is_valid() && rs->step_next()) { for (int i = 0; i < rs->column_count(); ++i) @@ -627,7 +627,7 @@ public: std::string & field, std::string & table, mapnik::layer_descriptor & desc, - boost::shared_ptr ds) + std::shared_ptr ds) { // http://www.sqlite.org/pragma.html#pragma_table_info @@ -636,7 +636,7 @@ public: // if the subquery-based type detection failed std::ostringstream s; s << "PRAGMA table_info(" << table << ")"; - boost::shared_ptr rs(ds->execute_query(s.str())); + std::shared_ptr rs(ds->execute_query(s.str())); bool found_table = false; bool found_pk = false; while (rs->is_valid() && rs->step_next()) diff --git a/plugins/input/templates/helloworld/hello_datasource.cpp b/plugins/input/templates/helloworld/hello_datasource.cpp index 38b1d0e10..40cddd0d6 100644 --- a/plugins/input/templates/helloworld/hello_datasource.cpp +++ b/plugins/input/templates/helloworld/hello_datasource.cpp @@ -62,7 +62,7 @@ mapnik::featureset_ptr hello_datasource::features(mapnik::query const& q) const // if the query box intersects our world extent then query for features if (extent_.intersects(q.get_bbox())) { - return boost::make_shared(q.get_bbox(),desc_.get_encoding()); + return std::make_shared(q.get_bbox(),desc_.get_encoding()); } // otherwise return an empty featureset pointer diff --git a/plugins/input/templates/helloworld/hello_featureset.cpp b/plugins/input/templates/helloworld/hello_featureset.cpp index deaabdff3..90a122006 100644 --- a/plugins/input/templates/helloworld/hello_featureset.cpp +++ b/plugins/input/templates/helloworld/hello_featureset.cpp @@ -12,7 +12,7 @@ hello_featureset::hello_featureset(mapnik::box2d const& box, std::string : box_(box), feature_id_(1), tr_(new mapnik::transcoder(encoding)), - ctx_(boost::make_shared()) { } + ctx_(std::make_shared()) { } hello_featureset::~hello_featureset() { } @@ -69,4 +69,3 @@ mapnik::feature_ptr hello_featureset::next() // otherwise return an empty feature return mapnik::feature_ptr(); } - diff --git a/src/agg/agg_renderer.cpp b/src/agg/agg_renderer.cpp index f270555cb..ce7769fe1 100644 --- a/src/agg/agg_renderer.cpp +++ b/src/agg/agg_renderer.cpp @@ -77,7 +77,7 @@ agg_renderer::agg_renderer(Map const& m, T & pixmap, double scale_factor, uns t_(m.width(),m.height(),m.get_current_extent(),offset_x,offset_y), font_engine_(), font_manager_(font_engine_), - detector_(boost::make_shared(box2d(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size() ,m.height() + m.buffer_size()))), + detector_(std::make_shared(box2d(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size() ,m.height() + m.buffer_size()))), ras_ptr(new rasterizer), query_extent_(), gamma_method_(GAMMA_POWER), @@ -99,7 +99,7 @@ agg_renderer::agg_renderer(Map const& m, request const& req, T & pixmap, doub t_(req.width(),req.height(),req.extent(),offset_x,offset_y), font_engine_(), font_manager_(font_engine_), - detector_(boost::make_shared(box2d(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size() ,req.height() + req.buffer_size()))), + detector_(std::make_shared(box2d(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size() ,req.height() + req.buffer_size()))), ras_ptr(new rasterizer), query_extent_(), gamma_method_(GAMMA_POWER), @@ -109,7 +109,7 @@ agg_renderer::agg_renderer(Map const& m, request const& req, T & pixmap, doub } template -agg_renderer::agg_renderer(Map const& m, T & pixmap, boost::shared_ptr detector, +agg_renderer::agg_renderer(Map const& m, T & pixmap, std::shared_ptr detector, double scale_factor, unsigned offset_x, unsigned offset_y) : feature_style_processor(m, scale_factor), pixmap_(pixmap), @@ -240,7 +240,7 @@ void agg_renderer::start_style_processing(feature_type_style const& st) { if (!internal_buffer_) { - internal_buffer_ = boost::make_shared(pixmap_.width(),pixmap_.height()); + internal_buffer_ = std::make_shared(pixmap_.width(),pixmap_.height()); } else { diff --git a/src/agg/process_point_symbolizer.cpp b/src/agg/process_point_symbolizer.cpp index 9046455b5..e7c3631a3 100644 --- a/src/agg/process_point_symbolizer.cpp +++ b/src/agg/process_point_symbolizer.cpp @@ -60,7 +60,7 @@ void agg_renderer::process(point_symbolizer const& sym, } else { - marker.reset(boost::make_shared()); + marker.reset(std::make_shared()); } if (marker) diff --git a/src/cairo_context.cpp b/src/cairo_context.cpp index cf04116f3..e2eebc217 100644 --- a/src/cairo_context.cpp +++ b/src/cairo_context.cpp @@ -31,7 +31,7 @@ #include namespace mapnik { -cairo_face::cairo_face(boost::shared_ptr const& engine, face_ptr const& face) +cairo_face::cairo_face(std::shared_ptr const& engine, face_ptr const& face) : face_(face) { static cairo_user_data_key_t key; diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index d74977285..c589a47df 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -96,7 +96,7 @@ struct cairo_save_restore }; -cairo_face_manager::cairo_face_manager(boost::shared_ptr engine) +cairo_face_manager::cairo_face_manager(std::shared_ptr engine) : font_engine_(engine) { } @@ -112,7 +112,7 @@ cairo_face_ptr cairo_face_manager::get_face(face_ptr face) } else { - entry = boost::make_shared(font_engine_, face); + entry = std::make_shared(font_engine_, face); cache_.insert(std::make_pair(face, entry)); } @@ -131,10 +131,10 @@ cairo_renderer_base::cairo_renderer_base(Map const& m, height_(m.height()), scale_factor_(scale_factor), t_(m.width(),m.height(),m.get_current_extent(),offset_x,offset_y), - font_engine_(boost::make_shared()), + font_engine_(std::make_shared()), font_manager_(*font_engine_), face_manager_(font_engine_), - detector_(boost::make_shared( + detector_(std::make_shared( box2d(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size(), m.height() + m.buffer_size()))) { @@ -153,10 +153,10 @@ cairo_renderer_base::cairo_renderer_base(Map const& m, height_(req.height()), scale_factor_(scale_factor), t_(req.width(),req.height(),req.extent(),offset_x,offset_y), - font_engine_(boost::make_shared()), + font_engine_(std::make_shared()), font_manager_(*font_engine_), face_manager_(font_engine_), - detector_(boost::make_shared( + detector_(std::make_shared( box2d(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size(), req.height() + req.buffer_size()))) { @@ -165,7 +165,7 @@ cairo_renderer_base::cairo_renderer_base(Map const& m, cairo_renderer_base::cairo_renderer_base(Map const& m, cairo_ptr const& cairo, - boost::shared_ptr detector, + std::shared_ptr detector, double scale_factor, unsigned offset_x, unsigned offset_y) @@ -175,7 +175,7 @@ cairo_renderer_base::cairo_renderer_base(Map const& m, height_(m.height()), scale_factor_(scale_factor), t_(m.width(),m.height(),m.get_current_extent(),offset_x,offset_y), - font_engine_(boost::make_shared()), + font_engine_(std::make_shared()), font_manager_(*font_engine_), face_manager_(font_engine_), detector_(detector) @@ -204,12 +204,12 @@ cairo_renderer::cairo_renderer(Map const& m, request const& r cairo_renderer_base(m,req, create_context(surface),scale_factor,offset_x,offset_y) {} template <> -cairo_renderer::cairo_renderer(Map const& m, cairo_ptr const& cairo, boost::shared_ptr detector, double scale_factor, unsigned offset_x, unsigned offset_y) +cairo_renderer::cairo_renderer(Map const& m, cairo_ptr const& cairo, std::shared_ptr detector, double scale_factor, unsigned offset_x, unsigned offset_y) : feature_style_processor(m,scale_factor), cairo_renderer_base(m,cairo,detector,scale_factor,offset_x,offset_y) {} template <> -cairo_renderer::cairo_renderer(Map const& m, cairo_surface_ptr const& surface, boost::shared_ptr detector, double scale_factor, unsigned offset_x, unsigned offset_y) +cairo_renderer::cairo_renderer(Map const& m, cairo_surface_ptr const& surface, std::shared_ptr detector, double scale_factor, unsigned offset_x, unsigned offset_y) : feature_style_processor(m,scale_factor), cairo_renderer_base(m,create_context(surface),detector,scale_factor,offset_x,offset_y) {} @@ -658,7 +658,7 @@ void cairo_renderer_base::process(point_symbolizer const& sym, } else { - marker.reset(boost::make_shared()); + marker.reset(std::make_shared()); } diff --git a/src/datasource_cache.cpp b/src/datasource_cache.cpp index 9773bb2be..57b46547d 100644 --- a/src/datasource_cache.cpp +++ b/src/datasource_cache.cpp @@ -82,7 +82,7 @@ datasource_ptr datasource_cache::create(parameters const& params) mutex::scoped_lock lock(mutex_); #endif - std::map >::iterator itr=plugins_.find(*type); + std::map >::iterator itr=plugins_.find(*type); if (itr == plugins_.end()) { std::string s("Could not create datasource for type: '"); @@ -152,7 +152,7 @@ std::vector datasource_cache::plugin_names() names = get_static_datasource_names(); #endif - std::map >::const_iterator itr; + std::map >::const_iterator itr; for (itr = plugins_.begin(); itr != plugins_.end(); ++itr) { names.push_back(itr->first); @@ -198,7 +198,7 @@ bool datasource_cache::register_datasource(std::string const& filename) bool success = false; try { - boost::shared_ptr plugin = boost::make_shared(filename,"datasource_name"); + std::shared_ptr plugin = std::make_shared(filename,"datasource_name"); if (plugin->valid()) { if (plugin->name().empty()) diff --git a/src/datasource_cache_static.cpp b/src/datasource_cache_static.cpp index 07e178ca4..93305dff4 100644 --- a/src/datasource_cache_static.cpp +++ b/src/datasource_cache_static.cpp @@ -87,7 +87,7 @@ namespace mapnik { template datasource_ptr ds_generator(parameters const& params) { - return boost::make_shared(params); + return std::make_shared(params); } typedef datasource_ptr (*ds_generator_ptr)(parameters const& params); diff --git a/src/expression.cpp b/src/expression.cpp index 44629de63..0de07ff65 100644 --- a/src/expression.cpp +++ b/src/expression.cpp @@ -50,7 +50,7 @@ expression_ptr parse_expression(std::string const& str, bool r = boost::spirit::qi::phrase_parse(itr, end, g, boost::spirit::standard_wide::space, node); if (r && itr == end) { - return boost::make_shared(node); + return std::make_shared(node); } else { diff --git a/src/font_engine_freetype.cpp b/src/font_engine_freetype.cpp index 8250e1a27..f8b8ad24e 100644 --- a/src/font_engine_freetype.cpp +++ b/src/font_engine_freetype.cpp @@ -238,7 +238,7 @@ face_ptr freetype_engine::create_face(std::string const& family_name) itr->second.first, // face index &face); - if (!error) return boost::make_shared(face); + if (!error) return std::make_shared(face); } else { @@ -257,7 +257,7 @@ face_ptr freetype_engine::create_face(std::string const& family_name) static_cast(buffer.size()), itr->second.first, &face); - if (!error) return boost::make_shared(face); + if (!error) return std::make_shared(face); else { // we can't load font, erase it. @@ -274,7 +274,7 @@ stroker_ptr freetype_engine::create_stroker() FT_Error error = FT_Stroker_New(library_, &s); if (!error) { - return boost::make_shared(s); + return std::make_shared(s); } return stroker_ptr(); } @@ -295,11 +295,11 @@ glyph_ptr font_face_set::get_glyph(unsigned c) const for ( face_ptr const& face : faces_) { FT_UInt g = face->get_char(c); - if (g) return boost::make_shared(face, g); + if (g) return std::make_shared(face, g); } // Final fallback to empty square if nothing better in any font - return boost::make_shared(*faces_.begin(), 0); + return std::make_shared(*faces_.begin(), 0); } char_info font_face_set::character_dimensions(unsigned int c) diff --git a/src/formatting/text.cpp b/src/formatting/text.cpp index 40272f3e5..4c7433c87 100644 --- a/src/formatting/text.cpp +++ b/src/formatting/text.cpp @@ -49,7 +49,7 @@ void text_node::to_xml(ptree &xml) const node_ptr text_node::from_xml(xml_node const& xml) { - return boost::make_shared(xml.get_value()); + return std::make_shared(xml.get_value()); } void text_node::apply(char_properties const& p, feature_impl const& feature, processed_text &output) const diff --git a/src/grid/grid.cpp b/src/grid/grid.cpp index a85ae3076..087ec7747 100644 --- a/src/grid/grid.cpp +++ b/src/grid/grid.cpp @@ -47,7 +47,7 @@ hit_grid::hit_grid(int width, int height, std::string const& key, unsigned in names_(), f_keys_(), features_(), - ctx_(boost::make_shared()) + ctx_(std::make_shared()) { f_keys_[base_mask] = ""; data_.set(base_mask); @@ -80,7 +80,7 @@ void hit_grid::clear() names_.clear(); f_keys_[base_mask] = ""; data_.set(base_mask); - ctx_ = boost::make_shared(); + ctx_ = std::make_shared(); } template diff --git a/src/grid/grid_renderer.cpp b/src/grid/grid_renderer.cpp index 682934aa5..52a86c7b0 100644 --- a/src/grid/grid_renderer.cpp +++ b/src/grid/grid_renderer.cpp @@ -66,7 +66,7 @@ grid_renderer::grid_renderer(Map const& m, T & pixmap, double scale_factor, u t_(pixmap_.width(),pixmap_.height(),m.get_current_extent(),offset_x,offset_y), font_engine_(), font_manager_(font_engine_), - detector_(boost::make_shared(box2d(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size() ,m.height() + m.buffer_size()))), + detector_(std::make_shared(box2d(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size() ,m.height() + m.buffer_size()))), ras_ptr(new grid_rasterizer) { setup(m); @@ -84,7 +84,7 @@ grid_renderer::grid_renderer(Map const& m, request const& req, T & pixmap, do t_(pixmap_.width(),pixmap_.height(),req.extent(),offset_x,offset_y), font_engine_(), font_manager_(font_engine_), - detector_(boost::make_shared(box2d(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size() ,req.height() + req.buffer_size()))), + detector_(std::make_shared(box2d(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size() ,req.height() + req.buffer_size()))), ras_ptr(new grid_rasterizer) { setup(m); diff --git a/src/grid/process_point_symbolizer.cpp b/src/grid/process_point_symbolizer.cpp index 3d0d68f40..8d6e648b4 100644 --- a/src/grid/process_point_symbolizer.cpp +++ b/src/grid/process_point_symbolizer.cpp @@ -60,7 +60,7 @@ void grid_renderer::process(point_symbolizer const& sym, } else { - marker.reset(boost::make_shared()); + marker.reset(std::make_shared()); } if (marker) diff --git a/src/load_map.cpp b/src/load_map.cpp index 36de527d2..1925aa030 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -212,7 +212,7 @@ void map_parser::parse_map(Map & map, xml_node const& pt, std::string const& bas throw config_error("failed to parse background-image-comp-op: '" + *comp_op_name + "'"); } } - + optional opacity = map_node.get_opt_attr("background-image-opacity"); if (opacity) { @@ -730,7 +730,7 @@ void map_parser::parse_layer(Map & map, xml_node const& node) //now we are ready to create datasource try { - boost::shared_ptr ds = + std::shared_ptr ds = datasource_cache::instance().create(params); lyr.set_datasource(ds); } @@ -875,7 +875,7 @@ void map_parser::parse_symbolizer_base(symbolizer_base &sym, xml_node const &pt) optional geometry_transform_wkt = pt.get_opt_attr("geometry-transform"); if (geometry_transform_wkt) { - mapnik::transform_list_ptr tl = boost::make_shared(); + mapnik::transform_list_ptr tl = std::make_shared(); if (!mapnik::parse_transform(*tl, *geometry_transform_wkt, pt.get_tree().transform_expr_grammar)) { std::string ss("Could not parse transform from '"); @@ -958,7 +958,7 @@ void map_parser::parse_point_symbolizer(rule & rule, xml_node const & sym) optional image_transform_wkt = sym.get_opt_attr("transform"); if (image_transform_wkt) { - mapnik::transform_list_ptr tl = boost::make_shared(); + mapnik::transform_list_ptr tl = std::make_shared(); if (!mapnik::parse_transform(*tl, *image_transform_wkt, sym.get_tree().transform_expr_grammar)) { throw mapnik::config_error("Failed to parse transform: '" + *image_transform_wkt + "'"); @@ -1036,7 +1036,7 @@ void map_parser::parse_markers_symbolizer(rule & rule, xml_node const& sym) optional image_transform_wkt = sym.get_opt_attr("transform"); if (image_transform_wkt) { - mapnik::transform_list_ptr tl = boost::make_shared(); + mapnik::transform_list_ptr tl = std::make_shared(); if (!mapnik::parse_transform(*tl, *image_transform_wkt, sym.get_tree().transform_expr_grammar)) { throw mapnik::config_error("Failed to parse transform: '" + *image_transform_wkt + "'"); @@ -1188,7 +1188,7 @@ void map_parser::parse_text_symbolizer(rule & rule, xml_node const& sym) if (placement_type) { placement_finder = placements::registry::instance().from_xml(*placement_type, sym, fontsets_); } else { - placement_finder = boost::make_shared(); + placement_finder = std::make_shared(); placement_finder->defaults.from_xml(sym, fontsets_); } if (strict_ && @@ -1220,7 +1220,7 @@ void map_parser::parse_shield_symbolizer(rule & rule, xml_node const& sym) if (placement_type) { placement_finder = placements::registry::instance().from_xml(*placement_type, sym, fontsets_); } else { - placement_finder = boost::make_shared(); + placement_finder = std::make_shared(); } placement_finder->defaults.from_xml(sym, fontsets_); if (strict_ && @@ -1234,7 +1234,7 @@ void map_parser::parse_shield_symbolizer(rule & rule, xml_node const& sym) optional image_transform_wkt = sym.get_opt_attr("transform"); if (image_transform_wkt) { - mapnik::transform_list_ptr tl = boost::make_shared(); + mapnik::transform_list_ptr tl = std::make_shared(); if (!mapnik::parse_transform(*tl, *image_transform_wkt, sym.get_tree().transform_expr_grammar)) { throw mapnik::config_error("Failed to parse transform: '" + *image_transform_wkt + "'"); @@ -1544,7 +1544,7 @@ void map_parser::parse_raster_symbolizer(rule & rule, xml_node const & sym) if (cssIter->is("RasterColorizer")) { found_colorizer = true; - raster_colorizer_ptr colorizer = boost::make_shared(); + raster_colorizer_ptr colorizer = std::make_shared(); raster_sym.set_colorizer(colorizer); if (parse_raster_colorizer(colorizer, *cssIter)) raster_sym.set_colorizer(colorizer); @@ -1554,7 +1554,7 @@ void map_parser::parse_raster_symbolizer(rule & rule, xml_node const & sym) // look for properties one level up if (!found_colorizer) { - raster_colorizer_ptr colorizer = boost::make_shared(); + raster_colorizer_ptr colorizer = std::make_shared(); if (parse_raster_colorizer(colorizer, sym)) raster_sym.set_colorizer(colorizer); } diff --git a/src/map.cpp b/src/map.cpp index 3b6b4fcfa..8c248c975 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -611,7 +611,7 @@ featureset_ptr Map::query_point(unsigned index, double x, double y) const MAPNIK_LOG_DEBUG(map) << "map: Query at point tol=" << tol << "(" << x << "," << y << ")"; if (fs) { - return boost::make_shared >(fs, + return std::make_shared >(fs, hit_test_filter(x,y,tol)); } } diff --git a/src/mapped_memory_cache.cpp b/src/mapped_memory_cache.cpp index 84cd66fde..2f2ace95c 100644 --- a/src/mapped_memory_cache.cpp +++ b/src/mapped_memory_cache.cpp @@ -71,7 +71,7 @@ boost::optional mapped_memory_cache::find(std::string const& try { boost::interprocess::file_mapping mapping(uri.c_str(),boost::interprocess::read_only); - mapped_region_ptr region(boost::make_shared(mapping,boost::interprocess::read_only)); + mapped_region_ptr region(std::make_shared(mapping,boost::interprocess::read_only)); result.reset(region); @@ -99,4 +99,4 @@ boost::optional mapped_memory_cache::find(std::string const& } -#endif \ No newline at end of file +#endif diff --git a/src/marker_cache.cpp b/src/marker_cache.cpp index 53004a219..259341866 100644 --- a/src/marker_cache.cpp +++ b/src/marker_cache.cpp @@ -141,7 +141,7 @@ boost::optional marker_cache::find(std::string const& uri, } std::string known_svg_string = mark_itr->second; using namespace mapnik::svg; - svg_path_ptr marker_path(boost::make_shared()); + svg_path_ptr marker_path(std::make_shared()); vertex_stl_adapter stl_storage(marker_path->source()); svg_path_adapter svg_path(stl_storage); svg_converter_type svg(svg_path, marker_path->attributes()); @@ -152,7 +152,7 @@ boost::optional marker_cache::find(std::string const& uri, svg.bounding_rect(&lox, &loy, &hix, &hiy); marker_path->set_bounding_box(lox,loy,hix,hiy); marker_path->set_dimensions(svg.width(),svg.height()); - marker_ptr mark(boost::make_shared(marker_path)); + marker_ptr mark(std::make_shared(marker_path)); result.reset(mark); if (update_cache) { @@ -170,7 +170,7 @@ boost::optional marker_cache::find(std::string const& uri, if (is_svg(uri)) { using namespace mapnik::svg; - svg_path_ptr marker_path(boost::make_shared()); + svg_path_ptr marker_path(std::make_shared()); vertex_stl_adapter stl_storage(marker_path->source()); svg_path_adapter svg_path(stl_storage); svg_converter_type svg(svg_path, marker_path->attributes()); @@ -181,7 +181,7 @@ boost::optional marker_cache::find(std::string const& uri, svg.bounding_rect(&lox, &loy, &hix, &hiy); marker_path->set_bounding_box(lox,loy,hix,hiy); marker_path->set_dimensions(svg.width(),svg.height()); - marker_ptr mark(boost::make_shared(marker_path)); + marker_ptr mark(std::make_shared(marker_path)); result.reset(mark); if (update_cache) { @@ -197,7 +197,7 @@ boost::optional marker_cache::find(std::string const& uri, unsigned width = reader->width(); unsigned height = reader->height(); BOOST_ASSERT(width > 0 && height > 0); - mapnik::image_ptr image(boost::make_shared(width,height)); + mapnik::image_ptr image(std::make_shared(width,height)); reader->read(0,0,*image); if (!reader->premultiplied_alpha()) { @@ -205,7 +205,7 @@ boost::optional marker_cache::find(std::string const& uri, agg::pixfmt_rgba32 pixf(buffer); pixf.premultiply(); } - marker_ptr mark(boost::make_shared(image)); + marker_ptr mark(std::make_shared(image)); result.reset(mark); if (update_cache) { diff --git a/src/memory_datasource.cpp b/src/memory_datasource.cpp index 3ea949545..8ae97efd1 100644 --- a/src/memory_datasource.cpp +++ b/src/memory_datasource.cpp @@ -83,7 +83,7 @@ datasource::datasource_t memory_datasource::type() const featureset_ptr memory_datasource::features(const query& q) const { - return boost::make_shared(q.get_bbox(),*this,bbox_check_); + return std::make_shared(q.get_bbox(),*this,bbox_check_); } @@ -92,7 +92,7 @@ featureset_ptr memory_datasource::features_at_point(coord2d const& pt, double to box2d box = box2d(pt.x, pt.y, pt.x, pt.y); box.pad(tol); MAPNIK_LOG_DEBUG(memory_datasource) << "memory_datasource: Box=" << box << ", Point x=" << pt.x << ",y=" << pt.y; - return boost::make_shared(box,*this); + return std::make_shared(box,*this); } void memory_datasource::set_envelope(box2d const& box) diff --git a/src/parse_path.cpp b/src/parse_path.cpp index c5cae5553..1359a2d0e 100644 --- a/src/parse_path.cpp +++ b/src/parse_path.cpp @@ -55,7 +55,7 @@ path_expression_ptr parse_path(std::string const& str, bool r = qi::phrase_parse(itr, end, g, boost::spirit::standard_wide::space, path); if (r && itr == end) { - return boost::make_shared(path); //path; + return std::make_shared(path); //path; } else { diff --git a/src/parse_transform.cpp b/src/parse_transform.cpp index b837f906e..f4bded667 100644 --- a/src/parse_transform.cpp +++ b/src/parse_transform.cpp @@ -36,7 +36,7 @@ transform_list_ptr parse_transform(std::string const& str) transform_list_ptr parse_transform(std::string const& str, std::string const& encoding) { - transform_list_ptr tl = boost::make_shared(); + transform_list_ptr tl = std::make_shared(); transcoder tc(encoding); expression_grammar ge(tc); transform_expression_grammar_string gte(ge); diff --git a/src/rule.cpp b/src/rule.cpp index 32ba4d694..f13bfa562 100644 --- a/src/rule.cpp +++ b/src/rule.cpp @@ -107,7 +107,7 @@ rule::rule() min_scale_(0), max_scale_(std::numeric_limits::infinity()), syms_(), - filter_(boost::make_shared(true)), + filter_(std::make_shared(true)), else_filter_(false), also_filter_(false) {} @@ -118,7 +118,7 @@ rule::rule(std::string const& name, min_scale_(min_scale_denominator), max_scale_(max_scale_denominator), syms_(), - filter_(boost::make_shared(true)), + filter_(std::make_shared(true)), else_filter_(false), also_filter_(false) {} diff --git a/src/svg/output/svg_renderer.cpp b/src/svg/output/svg_renderer.cpp index 49ce2b4db..b92347c25 100644 --- a/src/svg/output/svg_renderer.cpp +++ b/src/svg/output/svg_renderer.cpp @@ -44,7 +44,7 @@ svg_renderer::svg_renderer(Map const& m, T & output_iterator, double scale_fa t_(m.width(),m.height(),m.get_current_extent(),offset_x,offset_y), font_engine_(), font_manager_(font_engine_), - detector_(boost::make_shared(box2d(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size() ,m.height() + m.buffer_size()))), + detector_(std::make_shared(box2d(-m.buffer_size(), -m.buffer_size(), m.width() + m.buffer_size() ,m.height() + m.buffer_size()))), generator_(output_iterator), query_extent_(), painted_(false) @@ -60,7 +60,7 @@ svg_renderer::svg_renderer(Map const& m, request const& req, T & output_itera t_(req.width(),req.height(),req.extent(),offset_x,offset_y), font_engine_(), font_manager_(font_engine_), - detector_(boost::make_shared(box2d(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size() ,req.height() + req.buffer_size()))), + detector_(std::make_shared(box2d(-req.buffer_size(), -req.buffer_size(), req.width() + req.buffer_size() ,req.height() + req.buffer_size()))), generator_(output_iterator), query_extent_(), painted_(false) diff --git a/src/text_placements/dummy.cpp b/src/text_placements/dummy.cpp index 989fb542b..02c68318c 100644 --- a/src/text_placements/dummy.cpp +++ b/src/text_placements/dummy.cpp @@ -35,7 +35,7 @@ bool text_placement_info_dummy::next() text_placement_info_ptr text_placements_dummy::get_placement_info( double scale_factor) const { - return boost::make_shared(this, scale_factor); + return std::make_shared(this, scale_factor); } } //ns mapnik diff --git a/src/text_placements/list.cpp b/src/text_placements/list.cpp index bd0dccdc4..d470315d1 100644 --- a/src/text_placements/list.cpp +++ b/src/text_placements/list.cpp @@ -64,7 +64,7 @@ text_symbolizer_properties & text_placements_list::get(unsigned i) text_placement_info_ptr text_placements_list::get_placement_info(double scale_factor) const { - return boost::make_shared(this, scale_factor); + return std::make_shared(this, scale_factor); } text_placements_list::text_placements_list() : text_placements(), list_(0) @@ -109,4 +109,3 @@ text_placements_ptr text_placements_list::from_xml(xml_node const &xml, fontset_ } } //ns mapnik - diff --git a/src/text_placements/simple.cpp b/src/text_placements/simple.cpp index ec5f812d0..5f6c86325 100644 --- a/src/text_placements/simple.cpp +++ b/src/text_placements/simple.cpp @@ -105,7 +105,7 @@ bool text_placement_info_simple::next_position_only() text_placement_info_ptr text_placements_simple::get_placement_info( double scale_factor) const { - return boost::make_shared(this, scale_factor); + return std::make_shared(this, scale_factor); } /** Position string: [POS][SIZE] @@ -173,7 +173,7 @@ std::string text_placements_simple::get_positions() text_placements_ptr text_placements_simple::from_xml(xml_node const &xml, fontset_map const & fontsets) { - text_placements_ptr ptr = boost::make_shared( + text_placements_ptr ptr = std::make_shared( xml.get_attr("placements", "X")); ptr->defaults.from_xml(xml, fontsets); return ptr; diff --git a/src/text_properties.cpp b/src/text_properties.cpp index a695e17d8..836943af7 100644 --- a/src/text_properties.cpp +++ b/src/text_properties.cpp @@ -237,7 +237,7 @@ void text_symbolizer_properties::add_expressions(expression_set &output) const void text_symbolizer_properties::set_old_style_expression(expression_ptr expr) { - tree_ = boost::make_shared(expr); + tree_ = std::make_shared(expr); } char_properties::char_properties() : diff --git a/src/tiff_reader.cpp b/src/tiff_reader.cpp index cc2e32e37..c694181da 100644 --- a/src/tiff_reader.cpp +++ b/src/tiff_reader.cpp @@ -102,7 +102,7 @@ static int tiff_map_proc(thandle_t, tdata_t* , toff_t*) template class tiff_reader : public image_reader { - typedef boost::shared_ptr tiff_ptr; + typedef std::shared_ptr tiff_ptr; typedef T source_type; typedef boost::iostreams::stream input_stream; diff --git a/tests/cpp_tests/fontset_runtime_test.cpp b/tests/cpp_tests/fontset_runtime_test.cpp index 14ec2d83a..e99e46bc3 100644 --- a/tests/cpp_tests/fontset_runtime_test.cpp +++ b/tests/cpp_tests/fontset_runtime_test.cpp @@ -37,7 +37,7 @@ int main(int argc, char** argv) // create a renderable map with a fontset and a text symbolizer // and do not register any fonts, to ensure the error thrown is reasonable - mapnik::context_ptr ctx = boost::make_shared(); + mapnik::context_ptr ctx = std::make_shared(); ctx->push("name"); mapnik::feature_ptr feature(mapnik::feature_factory::create(ctx,1)); mapnik::transcoder tr("utf-8"); @@ -46,7 +46,7 @@ int main(int argc, char** argv) mapnik::geometry_type * pt = new mapnik::geometry_type(mapnik::geometry_type::types::Point); pt->move_to(128,128); feature->add_geometry(pt); - boost::shared_ptr ds = boost::make_shared(); + std::shared_ptr ds = std::make_shared(); ds->push(feature); mapnik::Map m(256,256); mapnik::font_set fontset("fontset"); diff --git a/tests/cpp_tests/map_request_test.cpp b/tests/cpp_tests/map_request_test.cpp index 610f9f12c..d4dc339b5 100644 --- a/tests/cpp_tests/map_request_test.cpp +++ b/tests/cpp_tests/map_request_test.cpp @@ -31,7 +31,7 @@ bool compare_images(std::string const& src_fn,std::string const& dest_fn) { throw mapnik::image_reader_exception("Failed to load: " + dest_fn); } - boost::shared_ptr image_ptr1 = boost::make_shared(reader1->width(),reader1->height()); + std::shared_ptr image_ptr1 = std::make_shared(reader1->width(),reader1->height()); reader1->read(0,0,image_ptr1->data()); std::unique_ptr reader2(mapnik::get_image_reader(src_fn,"png")); @@ -39,7 +39,7 @@ bool compare_images(std::string const& src_fn,std::string const& dest_fn) { throw mapnik::image_reader_exception("Failed to load: " + src_fn); } - boost::shared_ptr image_ptr2 = boost::make_shared(reader2->width(),reader2->height()); + std::shared_ptr image_ptr2 = std::make_shared(reader2->width(),reader2->height()); reader2->read(0,0,image_ptr2->data()); image_data_32 const& dest = image_ptr1->data(); diff --git a/utils/pgsql2sqlite/main.cpp b/utils/pgsql2sqlite/main.cpp index a5b13f945..204e8e88e 100644 --- a/utils/pgsql2sqlite/main.cpp +++ b/utils/pgsql2sqlite/main.cpp @@ -96,7 +96,7 @@ int main ( int argc, char** argv) ConnectionCreator creator(host,port,dbname,user,password,connect_timeout); try { - boost::shared_ptr conn(creator()); + std::shared_ptr conn(creator()); std::string query = vm["query"].as(); std::string output_table_name = vm.count("table") ? vm["table"].as() : mapnik::sql_utils::table_from_sql(query); diff --git a/utils/pgsql2sqlite/pgsql2sqlite.hpp b/utils/pgsql2sqlite/pgsql2sqlite.hpp index 8962d0f9f..a1370aa85 100644 --- a/utils/pgsql2sqlite/pgsql2sqlite.hpp +++ b/utils/pgsql2sqlite/pgsql2sqlite.hpp @@ -167,7 +167,7 @@ void pgsql2sqlite(Connection conn, namespace sqlite = mapnik::sqlite; sqlite::database db(output_filename); - boost::shared_ptr rs = conn->executeQuery("select * from (" + query + ") as query limit 0;"); + std::shared_ptr rs = conn->executeQuery("select * from (" + query + ") as query limit 0;"); int count = rs->getNumFields(); std::ostringstream select_sql; @@ -234,7 +234,7 @@ void pgsql2sqlite(Connection conn, cursor_sql << "DECLARE " << cursor_name << " BINARY INSENSITIVE NO SCROLL CURSOR WITH HOLD FOR " << select_sql_str << " FOR READ ONLY"; conn->execute(cursor_sql.str()); - boost::shared_ptr cursor(new CursorResultSet(conn,cursor_name,10000)); + std::shared_ptr cursor(new CursorResultSet(conn,cursor_name,10000)); unsigned num_fields = cursor->getNumFields(); diff --git a/utils/pgsql2sqlite/sqlite.hpp b/utils/pgsql2sqlite/sqlite.hpp index 1266a7604..5f4f3041b 100644 --- a/utils/pgsql2sqlite/sqlite.hpp +++ b/utils/pgsql2sqlite/sqlite.hpp @@ -52,7 +52,7 @@ namespace mapnik { namespace sqlite { } }; - typedef boost::shared_ptr sqlite_db; + typedef std::shared_ptr sqlite_db; sqlite_db db_; public: @@ -186,4 +186,3 @@ namespace mapnik { namespace sqlite { }; } } -