From caa03d78bdea32d7bba7a528182f8ab41e622330 Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 11 Apr 2016 15:14:52 +0200 Subject: [PATCH] move geometry_adapters.hpp to geometry/boost_geometry_adapters.hpp --- benchmark/test_polygon_clipping.cpp | 2 +- .../boost_geometry_adapters.hpp} | 0 include/mapnik/geometry_centroid.hpp | 2 +- include/mapnik/geometry_correct.hpp | 2 +- include/mapnik/geometry_is_simple.hpp | 2 +- include/mapnik/geometry_is_valid.hpp | 10 +++---- include/mapnik/geometry_strategy.hpp | 30 +++++++++---------- include/mapnik/geometry_transform.hpp | 2 +- include/mapnik/json/topojson_grammar_impl.hpp | 2 +- include/mapnik/json/topojson_utils.hpp | 2 +- plugins/input/csv/csv_datasource.cpp | 2 +- plugins/input/geojson/geojson_datasource.cpp | 2 +- .../input/topojson/topojson_datasource.cpp | 2 +- test/unit/serialization/wkb_test.cpp | 2 +- 14 files changed, 31 insertions(+), 31 deletions(-) rename include/mapnik/{geometry_adapters.hpp => geometry/boost_geometry_adapters.hpp} (100%) diff --git a/benchmark/test_polygon_clipping.cpp b/benchmark/test_polygon_clipping.cpp index b189a0443..81d16eeef 100644 --- a/benchmark/test_polygon_clipping.cpp +++ b/benchmark/test_polygon_clipping.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/mapnik/geometry_adapters.hpp b/include/mapnik/geometry/boost_geometry_adapters.hpp similarity index 100% rename from include/mapnik/geometry_adapters.hpp rename to include/mapnik/geometry/boost_geometry_adapters.hpp diff --git a/include/mapnik/geometry_centroid.hpp b/include/mapnik/geometry_centroid.hpp index 590ba4898..dab21f2b9 100644 --- a/include/mapnik/geometry_centroid.hpp +++ b/include/mapnik/geometry_centroid.hpp @@ -24,7 +24,7 @@ #define MAPNIK_GEOMETRY_CENTROID_HPP #include -#include +#include #include #include #include diff --git a/include/mapnik/geometry_correct.hpp b/include/mapnik/geometry_correct.hpp index dc83ad3a2..5da862394 100644 --- a/include/mapnik/geometry_correct.hpp +++ b/include/mapnik/geometry_correct.hpp @@ -24,7 +24,7 @@ #define MAPNIK_GEOMETRY_CORRECT_HPP #include -#include +#include #include #pragma GCC diagnostic push diff --git a/include/mapnik/geometry_is_simple.hpp b/include/mapnik/geometry_is_simple.hpp index 868b41afd..da3cac11c 100644 --- a/include/mapnik/geometry_is_simple.hpp +++ b/include/mapnik/geometry_is_simple.hpp @@ -29,7 +29,7 @@ #if BOOST_VERSION >= 105600 #include -#include +#include #include namespace mapnik { namespace geometry { diff --git a/include/mapnik/geometry_is_valid.hpp b/include/mapnik/geometry_is_valid.hpp index 95319cce9..ac58f54b5 100644 --- a/include/mapnik/geometry_is_valid.hpp +++ b/include/mapnik/geometry_is_valid.hpp @@ -29,7 +29,7 @@ #if BOOST_VERSION >= 105800 #include -#include +#include #include #include @@ -102,7 +102,7 @@ struct geometry_is_valid struct geometry_is_valid_reason { using result_type = bool; - + boost::geometry::validity_failure_type & failure_; geometry_is_valid_reason(boost::geometry::validity_failure_type & failure): @@ -170,7 +170,7 @@ struct geometry_is_valid_reason struct geometry_is_valid_string { using result_type = bool; - + std::string & message_; geometry_is_valid_string(std::string & message): @@ -257,7 +257,7 @@ inline bool is_valid(T const& geom, boost::geometry::validity_failure_type & fai } template -inline bool is_valid(mapnik::geometry::geometry const& geom, +inline bool is_valid(mapnik::geometry::geometry const& geom, boost::geometry::validity_failure_type & failure) { return util::apply_visitor(detail::geometry_is_valid_reason(failure), geom); @@ -270,7 +270,7 @@ inline bool is_valid(T const& geom, std::string & message) } template -inline bool is_valid(mapnik::geometry::geometry const& geom, +inline bool is_valid(mapnik::geometry::geometry const& geom, std::string & message) { return util::apply_visitor(detail::geometry_is_valid_string(message), geom); diff --git a/include/mapnik/geometry_strategy.hpp b/include/mapnik/geometry_strategy.hpp index cc4121e60..1ba643a54 100644 --- a/include/mapnik/geometry_strategy.hpp +++ b/include/mapnik/geometry_strategy.hpp @@ -23,20 +23,20 @@ #ifndef MAPNIK_GEOMETRY_STRATEGY_HPP #define MAPNIK_GEOMETRY_STRATEGY_HPP -#include +#include #include -namespace mapnik { +namespace mapnik { namespace geometry { namespace helper { template struct index {}; - + template struct gen_seq : gen_seq {}; - + template struct gen_seq<0, Ts...> : index {}; } @@ -70,7 +70,7 @@ struct strategy_group template inline P2 execute(P1 const& p, bool & status, T const& strat, Args const& ... args) const - { + { return execute(strat.template execute(p, status), status, args...); } @@ -79,7 +79,7 @@ struct strategy_group { return strat.template execute(p, status); } - + private: std::tuple ops_; @@ -87,7 +87,7 @@ private: // The difference between this strategy group and the previous is that the conversion from P1 to P2 happens -// in the first strategy rather then the last strategy. +// in the first strategy rather then the last strategy. template struct strategy_group_first { @@ -116,13 +116,13 @@ struct strategy_group_first template inline P2 execute_first(P1 const& p, bool & status, T const& strat, Args const& ... args) const - { + { return execute(strat.template execute(p, status), status, args...); } template inline P2 execute(P2 const& p, bool & status, T const& strat, Args const& ... args) const - { + { return execute(strat.template execute(p, status), status, args...); } @@ -131,13 +131,13 @@ struct strategy_group_first { return strat.template execute(p, status); } - + template inline P2 execute(P2 const& p, bool & status) const { return p; } - + private: std::tuple ops_; @@ -151,7 +151,7 @@ struct scale_strategy template inline bool apply(P1 const & p1, P2 & p2) const { - + using p2_type = typename boost::geometry::coordinate_type::type; double x = (boost::geometry::get<0>(p1) * scale_) + offset_; double y = (boost::geometry::get<1>(p1) * scale_) + offset_; @@ -159,7 +159,7 @@ struct scale_strategy boost::geometry::set<1>(p2, static_cast(y)); return true; } - + template inline P2 execute(P1 const& p1, bool & status) const { @@ -181,7 +181,7 @@ struct scale_rounding_strategy template inline bool apply(P1 const & p1, P2 & p2) const { - + using p2_type = typename boost::geometry::coordinate_type::type; double x = (boost::geometry::get<0>(p1) * scale_) + offset_; double y = (boost::geometry::get<1>(p1) * scale_) + offset_; @@ -189,7 +189,7 @@ struct scale_rounding_strategy boost::geometry::set<1>(p2, static_cast(std::round(y))); return true; } - + template inline P2 execute(P1 const& p1, bool & status) const { diff --git a/include/mapnik/geometry_transform.hpp b/include/mapnik/geometry_transform.hpp index a7bb2f13d..ad5a19403 100644 --- a/include/mapnik/geometry_transform.hpp +++ b/include/mapnik/geometry_transform.hpp @@ -24,7 +24,7 @@ #define MAPNIK_GEOMETRY_TRANSFORM_HPP #include -#include +#include #include namespace mapnik { namespace geometry { namespace detail { diff --git a/include/mapnik/json/topojson_grammar_impl.hpp b/include/mapnik/json/topojson_grammar_impl.hpp index ca8607996..b6cc1d10c 100644 --- a/include/mapnik/json/topojson_grammar_impl.hpp +++ b/include/mapnik/json/topojson_grammar_impl.hpp @@ -33,7 +33,7 @@ BOOST_FUSION_ADAPT_STRUCT( mapnik::topojson::coordinate, (double, x) - (double, y) + (double, y) ) BOOST_FUSION_ADAPT_STRUCT( diff --git a/include/mapnik/json/topojson_utils.hpp b/include/mapnik/json/topojson_utils.hpp index c4de30683..bece523f5 100644 --- a/include/mapnik/json/topojson_utils.hpp +++ b/include/mapnik/json/topojson_utils.hpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include namespace mapnik { namespace topojson { diff --git a/plugins/input/csv/csv_datasource.cpp b/plugins/input/csv/csv_datasource.cpp index 6c1ff1014..81be2535d 100644 --- a/plugins/input/csv/csv_datasource.cpp +++ b/plugins/input/csv/csv_datasource.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/plugins/input/geojson/geojson_datasource.cpp b/plugins/input/geojson/geojson_datasource.cpp index e9456f8e1..8eedf0d9f 100644 --- a/plugins/input/geojson/geojson_datasource.cpp +++ b/plugins/input/geojson/geojson_datasource.cpp @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/plugins/input/topojson/topojson_datasource.cpp b/plugins/input/topojson/topojson_datasource.cpp index 4c4e6b5df..2a7d1d9af 100644 --- a/plugins/input/topojson/topojson_datasource.cpp +++ b/plugins/input/topojson/topojson_datasource.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/unit/serialization/wkb_test.cpp b/test/unit/serialization/wkb_test.cpp index f82c4f32f..6536068e3 100644 --- a/test/unit/serialization/wkb_test.cpp +++ b/test/unit/serialization/wkb_test.cpp @@ -2,7 +2,7 @@ // mapnik #include #include -#include +#include #include #include // bool