From b73a42131afd419701701d7b1833dee1feeb6ef7 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 24 Mar 2016 17:08:44 +0000 Subject: [PATCH] box2 - add converting ctor --- include/mapnik/box2d.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/mapnik/box2d.hpp b/include/mapnik/box2d.hpp index fe1822018..a790c1d24 100644 --- a/include/mapnik/box2d.hpp +++ b/include/mapnik/box2d.hpp @@ -66,12 +66,22 @@ private: swap(lhs.maxy_, rhs.maxy_); } public: + box2d(); box2d(T minx,T miny,T maxx,T maxy); box2d(coord const& c0, coord const& c1); box2d(box2d_type const& rhs); box2d(box2d_type const& rhs, agg::trans_affine const& tr); + // move box2d(box2d_type&& rhs); + // converting ctor + template + explicit box2d(box2d other) + : minx_(static_cast(other.minx())), + miny_(static_cast(other.miny())), + maxx_(static_cast(other.maxx())), + maxy_(static_cast(other.maxy())) + {} box2d_type& operator=(box2d_type other); T minx() const; T miny() const;