use const std::unique_ptr<> instead of boost::scoped_ptr<>
This commit is contained in:
parent
62af2e6765
commit
09ce29489e
31 changed files with 60 additions and 60 deletions
|
@ -29,7 +29,7 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
#ifndef Q_MOC_RUN
|
||||
#include <mapnik/map.hpp>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
// boost
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
// qt
|
||||
#include <QList>
|
||||
#include <QIcon>
|
||||
|
@ -114,7 +114,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
boost::scoped_ptr<node_base> impl_;
|
||||
const std::unique_ptr<node_base> impl_;
|
||||
QList<node*> children_;
|
||||
node * parent_;
|
||||
};
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <mapnik/map.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
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<mapnik::Map> map_;
|
||||
boost::scoped_ptr<node> root_;
|
||||
const std::unique_ptr<node> root_;
|
||||
};
|
||||
|
||||
#endif // STYLE_MODEL_HPP
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <mapnik/request.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
// fwd declaration to avoid depedence on agg headers
|
||||
|
@ -157,7 +157,7 @@ private:
|
|||
freetype_engine font_engine_;
|
||||
face_manager<freetype_engine> font_manager_;
|
||||
std::shared_ptr<label_collision_detector4> detector_;
|
||||
boost::scoped_ptr<rasterizer> ras_ptr;
|
||||
const std::unique_ptr<rasterizer> ras_ptr;
|
||||
box2d<double> query_extent_;
|
||||
gamma_method_e gamma_method_;
|
||||
double gamma_;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <cairo.h>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
namespace agg {
|
||||
struct trans_affine;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <mapnik/pixel_position.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
// fwd declaration to avoid depedence on agg headers
|
||||
|
@ -136,7 +136,7 @@ private:
|
|||
freetype_engine font_engine_;
|
||||
face_manager<freetype_engine> font_manager_;
|
||||
std::shared_ptr<label_collision_detector4> detector_;
|
||||
boost::scoped_ptr<grid_rasterizer> ras_ptr;
|
||||
const std::unique_ptr<grid_rasterizer> ras_ptr;
|
||||
box2d<double> query_extent_;
|
||||
void setup(Map const& m);
|
||||
};
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#if BOOST_VERSION >= 104600
|
||||
#include <boost/range/algorithm.hpp>
|
||||
#endif
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
// stl
|
||||
#include <vector>
|
||||
|
@ -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<node> root_;
|
||||
const std::unique_ptr<node> root_;
|
||||
// working palette for quantization, sorted on mean(r,g,b,a) for easier searching NN
|
||||
std::vector<rgba> sorted_pal_;
|
||||
// index remaping of sorted_pal_ indexes to indexes of returned image palette
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <mapnik/unicode.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
// stl
|
||||
#include <vector>
|
||||
|
@ -49,7 +49,7 @@ public:
|
|||
~feature_collection_parser();
|
||||
bool parse(iterator_type first, iterator_type last, std::vector<mapnik::feature_ptr> & features);
|
||||
private:
|
||||
boost::scoped_ptr<feature_collection_grammar<iterator_type,feature_type> > grammar_;
|
||||
const std::unique_ptr<feature_collection_grammar<iterator_type,feature_type> > grammar_;
|
||||
};
|
||||
|
||||
}}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <mapnik/unicode.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
// stl
|
||||
#include <vector>
|
||||
|
@ -49,7 +49,7 @@ public:
|
|||
~feature_parser();
|
||||
bool parse(iterator_type first, iterator_type last, mapnik::feature_impl & f);
|
||||
private:
|
||||
boost::scoped_ptr<feature_grammar<iterator_type,feature_type> > grammar_;
|
||||
const std::unique_ptr<feature_grammar<iterator_type,feature_type> > grammar_;
|
||||
};
|
||||
|
||||
}}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <mapnik/feature.hpp>
|
||||
#include <mapnik/noncopyable.hpp>
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <iterator>
|
||||
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
~feature_generator();
|
||||
bool generate(std::string & geojson, mapnik::feature_impl const& f);
|
||||
private:
|
||||
boost::scoped_ptr<feature_generator_grammar<sink_type> > grammar_;
|
||||
const std::unique_ptr<feature_generator_grammar<sink_type> > 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<multi_geometry_generator_grammar<sink_type> > grammar_;
|
||||
const std::unique_ptr<multi_geometry_generator_grammar<sink_type> > grammar_;
|
||||
};
|
||||
|
||||
#else
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <mapnik/noncopyable.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
// stl
|
||||
//#include <vector>
|
||||
|
@ -49,7 +49,7 @@ public:
|
|||
~geometry_parser();
|
||||
bool parse(iterator_type first, iterator_type last, boost::ptr_vector<mapnik::geometry_type>&);
|
||||
private:
|
||||
boost::scoped_ptr<geometry_grammar<iterator_type> > grammar_;
|
||||
const std::unique_ptr<geometry_grammar<iterator_type> > grammar_;
|
||||
};
|
||||
|
||||
}}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
// boost
|
||||
#include <boost/variant/static_visitor.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
// stl
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <mapnik/processed_text.hpp>
|
||||
|
||||
//boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
// agg
|
||||
#include "agg_trans_affine.h"
|
||||
|
@ -112,7 +112,7 @@ protected:
|
|||
bool points_on_line_;
|
||||
|
||||
text_placement_info_ptr placement_;
|
||||
boost::scoped_ptr<placement_finder<DetectorT> > finder_;
|
||||
std::unique_ptr<placement_finder<DetectorT> > finder_;
|
||||
};
|
||||
|
||||
template <typename FaceManagerT, typename DetectorT>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
// boost
|
||||
#include <boost/ptr_container/ptr_vector.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
// stl
|
||||
|
@ -50,7 +50,7 @@ public:
|
|||
wkt_parser();
|
||||
bool parse(std::string const& wkt, boost::ptr_vector<geometry_type> & paths);
|
||||
private:
|
||||
boost::scoped_ptr<mapnik::wkt::wkt_collection_grammar<iterator_type> > grammar_;
|
||||
const std::unique_ptr<mapnik::wkt::wkt_collection_grammar<iterator_type> > grammar_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -122,7 +122,7 @@ feature_ptr occi_featureset::next()
|
|||
}
|
||||
else
|
||||
{
|
||||
boost::scoped_ptr<SDOGeometry> geom(dynamic_cast<SDOGeometry*>(rs_->getObject(1)));
|
||||
const std::unique_ptr<SDOGeometry> geom(dynamic_cast<SDOGeometry*>(rs_->getObject(1)));
|
||||
if (geom.get())
|
||||
{
|
||||
convert_geometry(geom.get(), feature);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <mapnik/unicode.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
// oci
|
||||
|
@ -70,7 +70,7 @@ private:
|
|||
|
||||
occi_connection_ptr conn_;
|
||||
oracle::occi::ResultSet* rs_;
|
||||
boost::scoped_ptr<mapnik::transcoder> tr_;
|
||||
const std::unique_ptr<mapnik::transcoder> tr_;
|
||||
mapnik::value_integer feature_id_;
|
||||
mapnik::context_ptr ctx_;
|
||||
bool use_wkb_;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <mapnik/geom_util.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
// ogr
|
||||
#include <ogrsf_frmts.h>
|
||||
|
@ -54,7 +54,7 @@ private:
|
|||
mapnik::context_ptr ctx_;
|
||||
OGRLayer& layer_;
|
||||
OGRFeatureDefn* layerdef_;
|
||||
boost::scoped_ptr<mapnik::transcoder> tr_;
|
||||
const std::unique_ptr<mapnik::transcoder> tr_;
|
||||
const char* fidcolumn_;
|
||||
mutable int count_;
|
||||
};
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <mapnik/feature.hpp>
|
||||
#include "ogr_featureset.hpp"
|
||||
|
||||
|
@ -48,7 +48,7 @@ private:
|
|||
filterT filter_;
|
||||
std::vector<int> ids_;
|
||||
std::vector<int>::iterator itr_;
|
||||
boost::scoped_ptr<mapnik::transcoder> tr_;
|
||||
const std::unique_ptr<mapnik::transcoder> tr_;
|
||||
const char* fidcolumn_;
|
||||
OGREnvelope feature_envelope_;
|
||||
};
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <set>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/geom_util.hpp>
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
private:
|
||||
filterT filter_;
|
||||
box2d<double> query_ext_;
|
||||
boost::scoped_ptr<transcoder> tr_;
|
||||
const std::unique_ptr<transcoder> tr_;
|
||||
std::vector<int> attr_ids_;
|
||||
mutable box2d<double> feature_ext_;
|
||||
mutable int total_geom_size;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
// boost
|
||||
#include <boost/optional.hpp>
|
||||
#include <memory>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
// stl
|
||||
#include <vector>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <mapnik/unicode.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
using mapnik::Featureset;
|
||||
using mapnik::box2d;
|
||||
|
@ -53,7 +53,7 @@ public:
|
|||
private:
|
||||
std::shared_ptr<IResultSet> rs_;
|
||||
context_ptr ctx_;
|
||||
boost::scoped_ptr<mapnik::transcoder> tr_;
|
||||
const std::unique_ptr<mapnik::transcoder> tr_;
|
||||
unsigned totalGeomSize_;
|
||||
mapnik::value_integer feature_id_;
|
||||
bool key_field_;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "shape_io.hpp"
|
||||
|
||||
//boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
using mapnik::Featureset;
|
||||
|
@ -60,7 +60,7 @@ private:
|
|||
shape_io shape_;
|
||||
box2d<double> query_ext_;
|
||||
mutable box2d<double> feature_bbox_;
|
||||
boost::scoped_ptr<transcoder> tr_;
|
||||
const std::unique_ptr<transcoder> tr_;
|
||||
long file_length_;
|
||||
std::vector<int> attr_ids_;
|
||||
mapnik::value_integer row_limit_;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <mapnik/value_types.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
|
||||
#include "shape_datasource.hpp"
|
||||
|
@ -62,7 +62,7 @@ private:
|
|||
filterT filter_;
|
||||
context_ptr ctx_;
|
||||
shape_io & shape_;
|
||||
boost::scoped_ptr<mapnik::transcoder> tr_;
|
||||
const std::unique_ptr<mapnik::transcoder> tr_;
|
||||
std::vector<std::streampos> offsets_;
|
||||
std::vector<std::streampos>::iterator itr_;
|
||||
std::vector<int> attr_ids_;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include <mapnik/wkb.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
// sqlite
|
||||
|
@ -52,7 +52,7 @@ public:
|
|||
private:
|
||||
std::shared_ptr<sqlite_resultset> rs_;
|
||||
mapnik::context_ptr ctx_;
|
||||
boost::scoped_ptr<mapnik::transcoder> tr_;
|
||||
const std::unique_ptr<mapnik::transcoder> tr_;
|
||||
mapnik::box2d<double> bbox_;
|
||||
mapnik::wkbFormat format_;
|
||||
bool spatial_index_;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <mapnik/unicode.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp> // 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<double> box_;
|
||||
mapnik::value_integer feature_id_;
|
||||
boost::scoped_ptr<mapnik::transcoder> tr_;
|
||||
const std::unique_ptr<mapnik::transcoder> tr_;
|
||||
mapnik::context_ptr ctx_;
|
||||
};
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <mapnik/expression.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
// stl
|
||||
#include <deque>
|
||||
|
@ -91,8 +91,8 @@ void agg_renderer<T>::process(building_symbolizer const& sym,
|
|||
geometry_type const& geom = feature.get_geometry(i);
|
||||
if (geom.size() > 2)
|
||||
{
|
||||
boost::scoped_ptr<geometry_type> frame(new geometry_type(geometry_type::types::LineString));
|
||||
boost::scoped_ptr<geometry_type> roof(new geometry_type(geometry_type::types::Polygon));
|
||||
const std::unique_ptr<geometry_type> frame(new geometry_type(geometry_type::types::LineString));
|
||||
const std::unique_ptr<geometry_type> roof(new geometry_type(geometry_type::types::Polygon));
|
||||
std::deque<segment_t> face_segments;
|
||||
double x0 = 0;
|
||||
double y0 = 0;
|
||||
|
@ -124,7 +124,7 @@ void agg_renderer<T>::process(building_symbolizer const& sym,
|
|||
|
||||
for (; itr!=end; ++itr)
|
||||
{
|
||||
boost::scoped_ptr<geometry_type> faces(new geometry_type(geometry_type::types::Polygon));
|
||||
const std::unique_ptr<geometry_type> 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);
|
||||
|
|
|
@ -360,8 +360,8 @@ void cairo_renderer_base::process(building_symbolizer const& sym,
|
|||
|
||||
if (geom.size() > 2)
|
||||
{
|
||||
boost::scoped_ptr<geometry_type> frame(new geometry_type(geometry_type::types::LineString));
|
||||
boost::scoped_ptr<geometry_type> roof(new geometry_type(geometry_type::types::Polygon));
|
||||
const std::unique_ptr<geometry_type> frame(new geometry_type(geometry_type::types::LineString));
|
||||
const std::unique_ptr<geometry_type> roof(new geometry_type(geometry_type::types::Polygon));
|
||||
std::deque<segment_t> face_segments;
|
||||
double x0 = 0;
|
||||
double y0 = 0;
|
||||
|
@ -392,7 +392,7 @@ void cairo_renderer_base::process(building_symbolizer const& sym,
|
|||
std::deque<segment_t>::const_iterator end=face_segments.end();
|
||||
for (; itr != end; ++itr)
|
||||
{
|
||||
boost::scoped_ptr<geometry_type> faces(new geometry_type(geometry_type::types::Polygon));
|
||||
const std::unique_ptr<geometry_type> 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);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <mapnik/expression.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
// stl
|
||||
#include <deque>
|
||||
|
@ -78,8 +78,8 @@ void grid_renderer<T>::process(building_symbolizer const& sym,
|
|||
geometry_type & geom = feature.get_geometry(i);
|
||||
if (geom.size() > 2)
|
||||
{
|
||||
boost::scoped_ptr<geometry_type> frame(new geometry_type(geometry_type::types::LineString));
|
||||
boost::scoped_ptr<geometry_type> roof(new geometry_type(geometry_type::types::Polygon));
|
||||
const std::unique_ptr<geometry_type> frame(new geometry_type(geometry_type::types::LineString));
|
||||
const std::unique_ptr<geometry_type> roof(new geometry_type(geometry_type::types::Polygon));
|
||||
std::deque<segment_t> face_segments;
|
||||
double x0(0);
|
||||
double y0(0);
|
||||
|
@ -106,7 +106,7 @@ void grid_renderer<T>::process(building_symbolizer const& sym,
|
|||
std::deque<segment_t>::const_iterator itr=face_segments.begin();
|
||||
for (;itr!=face_segments.end();++itr)
|
||||
{
|
||||
boost::scoped_ptr<geometry_type> faces(new geometry_type(geometry_type::types::Polygon));
|
||||
const std::unique_ptr<geometry_type> 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);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <mapnik/image_reader.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
|
|
@ -62,7 +62,7 @@ text_symbolizer_helper<FaceManagerT, DetectorT>::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;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
// boost
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
|
||||
namespace mapnik
|
||||
|
|
Loading…
Reference in a new issue