From d5f9a14b588a5558396c2afbed35def507c1a2e1 Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 10 Apr 2015 14:17:36 +0200 Subject: [PATCH] more fixes (dependent names etc) --- benchmark/test_polygon_clipping.cpp | 26 ++++++++++++------------- tests/cxx/geometry_equal.hpp | 30 ++++++++++++++--------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/benchmark/test_polygon_clipping.cpp b/benchmark/test_polygon_clipping.cpp index f30abd770..03683f9db 100644 --- a/benchmark/test_polygon_clipping.cpp +++ b/benchmark/test_polygon_clipping.cpp @@ -37,7 +37,7 @@ void render(mapnik::geometry::multi_polygon const& geom, mapnik::box2d const& extent, std::string const& name) { - using path_type = mapnik::transform_path_adapter; + using path_type = mapnik::transform_path_adapter>; using ren_base = agg::renderer_base; using renderer = agg::renderer_scanline_aa_solid; mapnik::image_rgba8 im(256,256); @@ -54,7 +54,7 @@ void render(mapnik::geometry::multi_polygon const& geom, agg::rasterizer_scanline_aa<> ras; for (auto const& poly : geom) { - mapnik::geometry::polygon_vertex_adapter va(poly); + mapnik::geometry::polygon_vertex_adapter va(poly); path_type path(tr,va,prj_trans); ras.add_path(path); } @@ -69,7 +69,7 @@ class test1 : public benchmark::test_case mapnik::box2d extent_; std::string expected_; public: - using conv_clip = agg::conv_clip_polygon; + using conv_clip = agg::conv_clip_polygon>; test1(mapnik::parameters const& params, std::string const& wkt_in, mapnik::box2d const& extent) @@ -95,7 +95,7 @@ public: return false; } mapnik::geometry::polygon const& poly = mapnik::util::get>(geom); - mapnik::geometry::polygon_vertex_adapter va(poly); + mapnik::geometry::polygon_vertex_adapter va(poly); conv_clip clipped(va); @@ -180,7 +180,7 @@ public: { unsigned count = 0; mapnik::geometry::polygon const& poly = mapnik::util::get>(geom); - mapnik::geometry::polygon_vertex_adapter va(poly); + mapnik::geometry::polygon_vertex_adapter va(poly); conv_clip clipped(va); clipped.clip_box( extent_.minx(), @@ -212,7 +212,7 @@ class test2 : public benchmark::test_case mapnik::box2d extent_; std::string expected_; public: - using poly_clipper = agg::conv_clipper; + using poly_clipper = agg::conv_clipper, agg::path_storage>; test2(mapnik::parameters const& params, std::string const& wkt_in, mapnik::box2d const& extent) @@ -244,7 +244,7 @@ public: ps.line_to(extent_.maxx(), extent_.maxy()); ps.line_to(extent_.maxx(), extent_.miny()); ps.close_polygon(); - mapnik::geometry::polygon_vertex_adapter va(poly); + mapnik::geometry::polygon_vertex_adapter va(poly); poly_clipper clipped(va,ps, agg::clipper_and, agg::clipper_non_zero, @@ -313,7 +313,7 @@ public: for (unsigned i=0;i va(poly); poly_clipper clipped(va,ps, agg::clipper_and, agg::clipper_non_zero, @@ -368,7 +368,7 @@ public: mapnik::geometry::polygon & poly = mapnik::util::get >(geom); mapnik::geometry::correct(poly); std::deque > result; - mapnik::geometry::bounding_box bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy()); + mapnik::geometry::bounding_box bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy()); boost::geometry::intersection(bbox,poly,result); std::string expect = expected_+".png"; std::string actual = expected_+"_actual.png"; @@ -407,7 +407,7 @@ public: } mapnik::geometry::polygon & poly = mapnik::util::get >(geom); mapnik::geometry::correct(poly); - mapnik::geometry::bounding_box bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy()); + mapnik::geometry::bounding_box bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy()); bool valid = true; for (unsigned i=0;i va(geom); unsigned cmd; double x,y; while ((cmd = va.vertex(&x, &y)) != mapnik::SEG_END) { @@ -567,7 +567,7 @@ public: } mapnik::geometry::polygon & poly = mapnik::util::get >(geom); mapnik::geometry::correct(poly); - mapnik::geometry::bounding_box bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy()); + mapnik::geometry::bounding_box bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy()); bool valid = true; for (unsigned i=0;i va(geom); unsigned cmd; double x,y; while ((cmd = va.vertex(&x, &y)) != mapnik::SEG_END) { diff --git a/tests/cxx/geometry_equal.hpp b/tests/cxx/geometry_equal.hpp index 8325895e7..9222c33ce 100644 --- a/tests/cxx/geometry_equal.hpp +++ b/tests/cxx/geometry_equal.hpp @@ -102,7 +102,7 @@ struct geometry_equal_visitor REQUIRE(p1.x == Approx(p2.x)); REQUIRE(p1.y == Approx(p2.y)); } - + template void operator() (line_string const& ls1, line_string const& ls2) { @@ -111,18 +111,18 @@ struct geometry_equal_visitor REQUIRE(false); } - for(auto const& p : zip_crange(ls1, ls2)) + for(auto const& p : zip_crange(ls1, ls2)) { - REQUIRE(p.get<0>().x == Approx(p.get<1>().x)); - REQUIRE(p.get<0>().y == Approx(p.get<1>().y)); + REQUIRE(p.template get<0>().x == Approx(p.template get<1>().x)); + REQUIRE(p.template get<0>().y == Approx(p.template get<1>().y)); } } - + template void operator() (polygon const& p1, polygon const& p2) { (*this)(static_cast const&>(p1.exterior_ring), static_cast const&>(p2.exterior_ring)); - + if (p1.interior_rings.size() != p2.interior_rings.size()) { REQUIRE(false); @@ -130,7 +130,7 @@ struct geometry_equal_visitor for (auto const& p : zip_crange(p1.interior_rings, p2.interior_rings)) { - (*this)(static_cast const&>(p.get<0>()),static_cast const&>(p.get<1>())); + (*this)(static_cast const&>(p.template get<0>()),static_cast const&>(p.template get<1>())); } } @@ -139,7 +139,7 @@ struct geometry_equal_visitor { (*this)(static_cast const&>(mp1), static_cast const&>(mp2)); } - + template void operator() (multi_line_string const& mls1, multi_line_string const& mls2) { @@ -150,10 +150,10 @@ struct geometry_equal_visitor for (auto const& ls : zip_crange(mls1, mls2)) { - (*this)(ls.get<0>(),ls.get<1>()); + (*this)(ls.template get<0>(),ls.template get<1>()); } } - + template void operator() (multi_polygon const& mpoly1, multi_polygon const& mpoly2) { @@ -164,10 +164,10 @@ struct geometry_equal_visitor for (auto const& poly : zip_crange(mpoly1, mpoly2)) { - (*this)(poly.get<0>(),poly.get<1>()); + (*this)(poly.template get<0>(),poly.template get<1>()); } } - + template void operator() (mapnik::util::recursive_wrapper > const& c1_, mapnik::util::recursive_wrapper > const& c2_) { @@ -180,10 +180,10 @@ struct geometry_equal_visitor for (auto const& g : zip_crange(c1, c2)) { - assert_g_equal(g.get<0>(),g.get<1>()); + assert_g_equal(g.template get<0>(),g.template get<1>()); } } - + template void operator() (geometry_collection const& c1, geometry_collection const& c2) { @@ -194,7 +194,7 @@ struct geometry_equal_visitor for (auto const& g : zip_crange(c1, c2)) { - assert_g_equal(g.get<0>(),g.get<1>()); + assert_g_equal(g.template get<0>(),g.template get<1>()); } } };