From 97fae7d1dd366fc1035a1396a16c27cdca590a80 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Wed, 9 Mar 2016 04:20:10 +0100 Subject: [PATCH] [strategies] Remove unneeded default_strtegy specializations for box_in_box strategy. --- .../strategies/cartesian/box_in_box.hpp | 52 ++++--------------- 1 file changed, 9 insertions(+), 43 deletions(-) diff --git a/include/boost/geometry/strategies/cartesian/box_in_box.hpp b/include/boost/geometry/strategies/cartesian/box_in_box.hpp index bc7c6580f..50897e4ce 100644 --- a/include/boost/geometry/strategies/cartesian/box_in_box.hpp +++ b/include/boost/geometry/strategies/cartesian/box_in_box.hpp @@ -5,8 +5,8 @@ // Copyright (c) 2009-2015 Mateusz Loskot, London, UK. // Copyright (c) 2013-2015 Adam Wulkiewicz, Lodz, Poland. -// This file was modified by Oracle on 2015. -// Modifications copyright (c) 2015, Oracle and/or its affiliates. +// This file was modified by Oracle on 2015, 2016. +// Modifications copyright (c) 2016, Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle @@ -84,8 +84,8 @@ struct box_within_range typedef math::detail::constants_on_spheroid constants; // min <= max <=> diff >= 0 - calc_t diff_ed = bed_max - bed_min; - calc_t diff_ing = bing_max - bing_min; + calc_t const diff_ed = bed_max - bed_min; + calc_t const diff_ing = bing_max - bing_min; // if containing is smaller it cannot contain // or interiors doesn't overlap (no interior in contained) if (diff_ing < diff_ed || diff_ed == 0) @@ -125,8 +125,8 @@ struct box_covered_by_range typedef math::detail::constants_on_spheroid constants; // min <= max <=> diff >= 0 - calc_t diff_ed = bed_max - bed_min; - calc_t diff_ing = bing_max - bing_min; + calc_t const diff_ed = bed_max - bed_min; + calc_t const diff_ing = bing_max - bing_min; // if containing is smaller it cannot contain if (diff_ing < diff_ed) return false; @@ -147,16 +147,7 @@ struct box_covered_by_range }; -template -struct box_within_range - : box_within_range -{}; - - -template -struct box_covered_by_range - : box_covered_by_range -{}; +// geographic_tag is casted to spherical_tag template @@ -261,18 +252,7 @@ struct default_strategy typedef within::box_in_box type; }; -template -struct default_strategy - < - box_tag, box_tag, - box_tag, areal_tag, - geographic_tag, geographic_tag, - BoxContained, BoxContaining - > -{ - typedef within::box_in_box type; -}; - +// geographic_tag is casted to spherical_tag }} // namespace within::services @@ -311,21 +291,7 @@ struct default_strategy > type; }; -template -struct default_strategy - < - box_tag, box_tag, - box_tag, areal_tag, - geographic_tag, geographic_tag, - BoxContained, BoxContaining - > -{ - typedef within::box_in_box - < - BoxContained, BoxContaining, - within::box_covered_by_range - > type; -}; +// geographic_tag is casted to spherical_tag }} // namespace covered_by::services