diff --git a/demo/viewer/mapwidget.hpp b/demo/viewer/mapwidget.hpp index 73c8e12e8..e3cff1a98 100644 --- a/demo/viewer/mapwidget.hpp +++ b/demo/viewer/mapwidget.hpp @@ -29,7 +29,7 @@ #include #include #include -#include + #ifndef Q_MOC_RUN #include diff --git a/demo/viewer/styles_model.cpp b/demo/viewer/styles_model.cpp index 229cbdf9f..64ec4cc92 100644 --- a/demo/viewer/styles_model.cpp +++ b/demo/viewer/styles_model.cpp @@ -26,7 +26,7 @@ // boost #include -#include + // qt #include #include @@ -114,7 +114,7 @@ public: } private: - boost::scoped_ptr impl_; + const std::unique_ptr impl_; QList children_; node * parent_; }; diff --git a/demo/viewer/styles_model.hpp b/demo/viewer/styles_model.hpp index b162c92ef..17af661ed 100644 --- a/demo/viewer/styles_model.hpp +++ b/demo/viewer/styles_model.hpp @@ -27,7 +27,7 @@ #include #endif -#include + class node; class StyleModel : public QAbstractItemModel @@ -44,7 +44,7 @@ class StyleModel : public QAbstractItemModel QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const; private: //std::shared_ptr map_; - boost::scoped_ptr root_; + const std::unique_ptr root_; }; #endif // STYLE_MODEL_HPP diff --git a/include/mapnik/agg_renderer.hpp b/include/mapnik/agg_renderer.hpp index 59005c2f6..7d29dc856 100644 --- a/include/mapnik/agg_renderer.hpp +++ b/include/mapnik/agg_renderer.hpp @@ -37,7 +37,7 @@ #include // boost -#include + #include // fwd declaration to avoid depedence on agg headers @@ -157,7 +157,7 @@ private: freetype_engine font_engine_; face_manager font_manager_; std::shared_ptr detector_; - boost::scoped_ptr ras_ptr; + const std::unique_ptr ras_ptr; box2d query_extent_; gamma_method_e gamma_method_; double gamma_; diff --git a/include/mapnik/cairo_renderer.hpp b/include/mapnik/cairo_renderer.hpp index 5cbab623d..1d18bcf28 100644 --- a/include/mapnik/cairo_renderer.hpp +++ b/include/mapnik/cairo_renderer.hpp @@ -41,7 +41,7 @@ #include // boost -#include + namespace agg { struct trans_affine; diff --git a/include/mapnik/grid/grid_renderer.hpp b/include/mapnik/grid/grid_renderer.hpp index f56180a2c..12ed6b1c4 100644 --- a/include/mapnik/grid/grid_renderer.hpp +++ b/include/mapnik/grid/grid_renderer.hpp @@ -37,7 +37,7 @@ #include // boost -#include + #include // fwd declaration to avoid depedence on agg headers @@ -136,7 +136,7 @@ private: freetype_engine font_engine_; face_manager font_manager_; std::shared_ptr detector_; - boost::scoped_ptr ras_ptr; + const std::unique_ptr ras_ptr; box2d query_extent_; void setup(Map const& m); }; diff --git a/include/mapnik/hextree.hpp b/include/mapnik/hextree.hpp index 299945a11..486d98455 100644 --- a/include/mapnik/hextree.hpp +++ b/include/mapnik/hextree.hpp @@ -33,7 +33,7 @@ #if BOOST_VERSION >= 104600 #include #endif -#include + // stl #include @@ -124,7 +124,7 @@ class hextree : private mapnik::noncopyable unsigned colors_; // flag indicating existance of invisible pixels (a < InsertPolicy::MIN_ALPHA) bool has_holes_; - boost::scoped_ptr root_; + const std::unique_ptr root_; // working palette for quantization, sorted on mean(r,g,b,a) for easier searching NN std::vector sorted_pal_; // index remaping of sorted_pal_ indexes to indexes of returned image palette diff --git a/include/mapnik/json/feature_collection_parser.hpp b/include/mapnik/json/feature_collection_parser.hpp index 63473712e..3ce5361bd 100644 --- a/include/mapnik/json/feature_collection_parser.hpp +++ b/include/mapnik/json/feature_collection_parser.hpp @@ -30,7 +30,7 @@ #include // boost -#include + // stl #include @@ -49,7 +49,7 @@ public: ~feature_collection_parser(); bool parse(iterator_type first, iterator_type last, std::vector & features); private: - boost::scoped_ptr > grammar_; + const std::unique_ptr > grammar_; }; }} diff --git a/include/mapnik/json/feature_parser.hpp b/include/mapnik/json/feature_parser.hpp index e3c3ed8d6..e55d757cb 100644 --- a/include/mapnik/json/feature_parser.hpp +++ b/include/mapnik/json/feature_parser.hpp @@ -30,7 +30,7 @@ #include // boost -#include + // stl #include @@ -49,7 +49,7 @@ public: ~feature_parser(); bool parse(iterator_type first, iterator_type last, mapnik::feature_impl & f); private: - boost::scoped_ptr > grammar_; + const std::unique_ptr > grammar_; }; }} diff --git a/include/mapnik/json/geojson_generator.hpp b/include/mapnik/json/geojson_generator.hpp index ac342b6af..b3049e6ca 100644 --- a/include/mapnik/json/geojson_generator.hpp +++ b/include/mapnik/json/geojson_generator.hpp @@ -27,7 +27,7 @@ #include #include -#include + #include #include @@ -46,7 +46,7 @@ public: ~feature_generator(); bool generate(std::string & geojson, mapnik::feature_impl const& f); private: - boost::scoped_ptr > grammar_; + const std::unique_ptr > grammar_; }; class MAPNIK_DECL geometry_generator : private mapnik::noncopyable @@ -57,7 +57,7 @@ public: ~geometry_generator(); bool generate(std::string & geojson, mapnik::geometry_container const& g); private: - boost::scoped_ptr > grammar_; + const std::unique_ptr > grammar_; }; #else diff --git a/include/mapnik/json/geometry_parser.hpp b/include/mapnik/json/geometry_parser.hpp index 76985f9a5..7a617a060 100644 --- a/include/mapnik/json/geometry_parser.hpp +++ b/include/mapnik/json/geometry_parser.hpp @@ -29,7 +29,7 @@ #include // boost -#include + // stl //#include @@ -49,7 +49,7 @@ public: ~geometry_parser(); bool parse(iterator_type first, iterator_type last, boost::ptr_vector&); private: - boost::scoped_ptr > grammar_; + const std::unique_ptr > grammar_; }; }} diff --git a/include/mapnik/svg/output/svg_renderer.hpp b/include/mapnik/svg/output/svg_renderer.hpp index a6f0db439..05e1f931f 100644 --- a/include/mapnik/svg/output/svg_renderer.hpp +++ b/include/mapnik/svg/output/svg_renderer.hpp @@ -40,7 +40,7 @@ // boost #include -#include + #include // stl diff --git a/include/mapnik/symbolizer_helpers.hpp b/include/mapnik/symbolizer_helpers.hpp index 479b02db9..507f81efc 100644 --- a/include/mapnik/symbolizer_helpers.hpp +++ b/include/mapnik/symbolizer_helpers.hpp @@ -30,7 +30,7 @@ #include //boost -#include + // agg #include "agg_trans_affine.h" @@ -112,7 +112,7 @@ protected: bool points_on_line_; text_placement_info_ptr placement_; - boost::scoped_ptr > finder_; + std::unique_ptr > finder_; }; template diff --git a/include/mapnik/wkt/wkt_factory.hpp b/include/mapnik/wkt/wkt_factory.hpp index a35299b9b..20436b843 100644 --- a/include/mapnik/wkt/wkt_factory.hpp +++ b/include/mapnik/wkt/wkt_factory.hpp @@ -31,7 +31,7 @@ // boost #include -#include + #include // stl @@ -50,7 +50,7 @@ public: wkt_parser(); bool parse(std::string const& wkt, boost::ptr_vector & paths); private: - boost::scoped_ptr > grammar_; + const std::unique_ptr > grammar_; }; #endif diff --git a/plugins/input/occi/occi_featureset.cpp b/plugins/input/occi/occi_featureset.cpp index 1cb0cf4cc..393e4ed8b 100644 --- a/plugins/input/occi/occi_featureset.cpp +++ b/plugins/input/occi/occi_featureset.cpp @@ -122,7 +122,7 @@ feature_ptr occi_featureset::next() } else { - boost::scoped_ptr geom(dynamic_cast(rs_->getObject(1))); + const std::unique_ptr geom(dynamic_cast(rs_->getObject(1))); if (geom.get()) { convert_geometry(geom.get(), feature); diff --git a/plugins/input/occi/occi_featureset.hpp b/plugins/input/occi/occi_featureset.hpp index c43707c95..cb879ea04 100644 --- a/plugins/input/occi/occi_featureset.hpp +++ b/plugins/input/occi/occi_featureset.hpp @@ -30,7 +30,7 @@ #include // boost -#include + #include // oci @@ -70,7 +70,7 @@ private: occi_connection_ptr conn_; oracle::occi::ResultSet* rs_; - boost::scoped_ptr tr_; + const std::unique_ptr tr_; mapnik::value_integer feature_id_; mapnik::context_ptr ctx_; bool use_wkb_; diff --git a/plugins/input/ogr/ogr_featureset.hpp b/plugins/input/ogr/ogr_featureset.hpp index 29f707f7f..861ff27fd 100644 --- a/plugins/input/ogr/ogr_featureset.hpp +++ b/plugins/input/ogr/ogr_featureset.hpp @@ -30,7 +30,7 @@ #include // boost -#include + // ogr #include @@ -54,7 +54,7 @@ private: mapnik::context_ptr ctx_; OGRLayer& layer_; OGRFeatureDefn* layerdef_; - boost::scoped_ptr tr_; + const std::unique_ptr tr_; const char* fidcolumn_; mutable int count_; }; diff --git a/plugins/input/ogr/ogr_index_featureset.hpp b/plugins/input/ogr/ogr_index_featureset.hpp index 9972935e4..83645da00 100644 --- a/plugins/input/ogr/ogr_index_featureset.hpp +++ b/plugins/input/ogr/ogr_index_featureset.hpp @@ -25,7 +25,7 @@ #include #include -#include + #include #include "ogr_featureset.hpp" @@ -48,7 +48,7 @@ private: filterT filter_; std::vector ids_; std::vector::iterator itr_; - boost::scoped_ptr tr_; + const std::unique_ptr tr_; const char* fidcolumn_; OGREnvelope feature_envelope_; }; diff --git a/plugins/input/osm/osm_featureset.hpp b/plugins/input/osm/osm_featureset.hpp index bf9510ed9..ebf11c755 100644 --- a/plugins/input/osm/osm_featureset.hpp +++ b/plugins/input/osm/osm_featureset.hpp @@ -27,7 +27,7 @@ #include // boost -#include + // mapnik #include @@ -57,7 +57,7 @@ public: private: filterT filter_; box2d query_ext_; - boost::scoped_ptr tr_; + const std::unique_ptr tr_; std::vector attr_ids_; mutable box2d feature_ext_; mutable int total_geom_size; diff --git a/plugins/input/postgis/postgis_datasource.hpp b/plugins/input/postgis/postgis_datasource.hpp index fe93f5525..cfeca049d 100644 --- a/plugins/input/postgis/postgis_datasource.hpp +++ b/plugins/input/postgis/postgis_datasource.hpp @@ -37,7 +37,7 @@ // boost #include #include -#include + // stl #include diff --git a/plugins/input/postgis/postgis_featureset.hpp b/plugins/input/postgis/postgis_featureset.hpp index 3ea082394..ea13a1824 100644 --- a/plugins/input/postgis/postgis_featureset.hpp +++ b/plugins/input/postgis/postgis_featureset.hpp @@ -30,7 +30,7 @@ #include // boost -#include + using mapnik::Featureset; using mapnik::box2d; @@ -53,7 +53,7 @@ public: private: std::shared_ptr rs_; context_ptr ctx_; - boost::scoped_ptr tr_; + const std::unique_ptr tr_; unsigned totalGeomSize_; mapnik::value_integer feature_id_; bool key_field_; diff --git a/plugins/input/shape/shape_featureset.hpp b/plugins/input/shape/shape_featureset.hpp index cc643a511..a71e59e65 100644 --- a/plugins/input/shape/shape_featureset.hpp +++ b/plugins/input/shape/shape_featureset.hpp @@ -33,7 +33,7 @@ #include "shape_io.hpp" //boost -#include + #include using mapnik::Featureset; @@ -60,7 +60,7 @@ private: shape_io shape_; box2d query_ext_; mutable box2d feature_bbox_; - boost::scoped_ptr tr_; + const std::unique_ptr tr_; long file_length_; std::vector attr_ids_; mapnik::value_integer row_limit_; diff --git a/plugins/input/shape/shape_index_featureset.hpp b/plugins/input/shape/shape_index_featureset.hpp index 5863b3246..0d860792f 100644 --- a/plugins/input/shape/shape_index_featureset.hpp +++ b/plugins/input/shape/shape_index_featureset.hpp @@ -34,7 +34,7 @@ #include // boost -#include + #include #include "shape_datasource.hpp" @@ -62,7 +62,7 @@ private: filterT filter_; context_ptr ctx_; shape_io & shape_; - boost::scoped_ptr tr_; + const std::unique_ptr tr_; std::vector offsets_; std::vector::iterator itr_; std::vector attr_ids_; diff --git a/plugins/input/sqlite/sqlite_featureset.hpp b/plugins/input/sqlite/sqlite_featureset.hpp index 463063dce..6fc53602f 100644 --- a/plugins/input/sqlite/sqlite_featureset.hpp +++ b/plugins/input/sqlite/sqlite_featureset.hpp @@ -29,7 +29,7 @@ #include // boost -#include + #include // sqlite @@ -52,7 +52,7 @@ public: private: std::shared_ptr rs_; mapnik::context_ptr ctx_; - boost::scoped_ptr tr_; + const std::unique_ptr tr_; mapnik::box2d bbox_; mapnik::wkbFormat format_; bool spatial_index_; diff --git a/plugins/input/templates/helloworld/hello_featureset.hpp b/plugins/input/templates/helloworld/hello_featureset.hpp index b73f15070..43f338fad 100644 --- a/plugins/input/templates/helloworld/hello_featureset.hpp +++ b/plugins/input/templates/helloworld/hello_featureset.hpp @@ -7,7 +7,7 @@ #include // boost -#include // needed for wrapping the transcoder + // needed for wrapping the transcoder class hello_featureset : public mapnik::Featureset { @@ -25,7 +25,7 @@ private: // members are up to you, but these are recommended mapnik::box2d box_; mapnik::value_integer feature_id_; - boost::scoped_ptr tr_; + const std::unique_ptr tr_; mapnik::context_ptr ctx_; }; diff --git a/src/agg/process_building_symbolizer.cpp b/src/agg/process_building_symbolizer.cpp index 65f1e6b79..9329c8cc8 100644 --- a/src/agg/process_building_symbolizer.cpp +++ b/src/agg/process_building_symbolizer.cpp @@ -31,7 +31,7 @@ #include // boost -#include + // stl #include @@ -91,8 +91,8 @@ void agg_renderer::process(building_symbolizer const& sym, geometry_type const& geom = feature.get_geometry(i); if (geom.size() > 2) { - boost::scoped_ptr frame(new geometry_type(geometry_type::types::LineString)); - boost::scoped_ptr roof(new geometry_type(geometry_type::types::Polygon)); + const std::unique_ptr frame(new geometry_type(geometry_type::types::LineString)); + const std::unique_ptr roof(new geometry_type(geometry_type::types::Polygon)); std::deque face_segments; double x0 = 0; double y0 = 0; @@ -124,7 +124,7 @@ void agg_renderer::process(building_symbolizer const& sym, for (; itr!=end; ++itr) { - boost::scoped_ptr faces(new geometry_type(geometry_type::types::Polygon)); + const std::unique_ptr faces(new geometry_type(geometry_type::types::Polygon)); faces->move_to(itr->get<0>(),itr->get<1>()); faces->line_to(itr->get<2>(),itr->get<3>()); faces->line_to(itr->get<2>(),itr->get<3>() + height); diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index c589a47df..aa1207256 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -360,8 +360,8 @@ void cairo_renderer_base::process(building_symbolizer const& sym, if (geom.size() > 2) { - boost::scoped_ptr frame(new geometry_type(geometry_type::types::LineString)); - boost::scoped_ptr roof(new geometry_type(geometry_type::types::Polygon)); + const std::unique_ptr frame(new geometry_type(geometry_type::types::LineString)); + const std::unique_ptr roof(new geometry_type(geometry_type::types::Polygon)); std::deque face_segments; double x0 = 0; double y0 = 0; @@ -392,7 +392,7 @@ void cairo_renderer_base::process(building_symbolizer const& sym, std::deque::const_iterator end=face_segments.end(); for (; itr != end; ++itr) { - boost::scoped_ptr faces(new geometry_type(geometry_type::types::Polygon)); + const std::unique_ptr faces(new geometry_type(geometry_type::types::Polygon)); faces->move_to(itr->get<0>(), itr->get<1>()); faces->line_to(itr->get<2>(), itr->get<3>()); faces->line_to(itr->get<2>(), itr->get<3>() + height); diff --git a/src/grid/process_building_symbolizer.cpp b/src/grid/process_building_symbolizer.cpp index 941917fda..b3c8805c5 100644 --- a/src/grid/process_building_symbolizer.cpp +++ b/src/grid/process_building_symbolizer.cpp @@ -32,7 +32,7 @@ #include // boost -#include + // stl #include @@ -78,8 +78,8 @@ void grid_renderer::process(building_symbolizer const& sym, geometry_type & geom = feature.get_geometry(i); if (geom.size() > 2) { - boost::scoped_ptr frame(new geometry_type(geometry_type::types::LineString)); - boost::scoped_ptr roof(new geometry_type(geometry_type::types::Polygon)); + const std::unique_ptr frame(new geometry_type(geometry_type::types::LineString)); + const std::unique_ptr roof(new geometry_type(geometry_type::types::Polygon)); std::deque face_segments; double x0(0); double y0(0); @@ -106,7 +106,7 @@ void grid_renderer::process(building_symbolizer const& sym, std::deque::const_iterator itr=face_segments.begin(); for (;itr!=face_segments.end();++itr) { - boost::scoped_ptr faces(new geometry_type(geometry_type::types::Polygon)); + const std::unique_ptr faces(new geometry_type(geometry_type::types::Polygon)); faces->move_to(itr->get<0>(),itr->get<1>()); faces->line_to(itr->get<2>(),itr->get<3>()); faces->line_to(itr->get<2>(),itr->get<3>() + height); diff --git a/src/shield_symbolizer.cpp b/src/shield_symbolizer.cpp index f7b7d0f53..8ef650fee 100644 --- a/src/shield_symbolizer.cpp +++ b/src/shield_symbolizer.cpp @@ -26,7 +26,7 @@ #include // boost -#include + namespace mapnik { diff --git a/src/symbolizer_helpers.cpp b/src/symbolizer_helpers.cpp index 91abab87d..0490a54fa 100644 --- a/src/symbolizer_helpers.cpp +++ b/src/symbolizer_helpers.cpp @@ -62,7 +62,7 @@ text_symbolizer_helper::text_symbolizer_helper(text_sym angle_(0.0), placement_valid_(false), points_on_line_(false), - finder_(0) + finder_() { initialize_geometries(); if (!geometries_to_process_.size()) return; diff --git a/src/text_symbolizer.cpp b/src/text_symbolizer.cpp index 61ea9f6ac..82e25b960 100644 --- a/src/text_symbolizer.cpp +++ b/src/text_symbolizer.cpp @@ -28,7 +28,7 @@ // boost -#include + namespace mapnik