diff options
author | zmiao <miao.zhao@mapbox.com> | 2020-02-19 12:06:42 +0200 |
---|---|---|
committer | zmiao <miao.zhao@mapbox.com> | 2020-02-21 21:39:48 +0200 |
commit | b9425dd4ecd112f0f455b6a6950039d77305a465 (patch) | |
tree | c5cc09057e9947c2638af3e96c786b8ecc474713 | |
parent | b47fa36c1d5071272b56d6679a20659325e272b1 (diff) | |
download | qtlocation-mapboxgl-b9425dd4ecd112f0f455b6a6950039d77305a465.tar.gz |
[core] Remove unnecessary includes, fix comments
This reverts commit b5c386ad7708ca9fe14f219b0ffc94cf6ce8fc88.
-rw-r--r-- | include/mbgl/style/expression/within.hpp | 5 | ||||
-rw-r--r-- | src/mbgl/style/expression/within.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/util/geometry_within.cpp | 1 | ||||
-rw-r--r-- | test/style/property_expression.test.cpp | 6 |
4 files changed, 5 insertions, 10 deletions
diff --git a/include/mbgl/style/expression/within.hpp b/include/mbgl/style/expression/within.hpp index 4116b60bc8..37e27f4940 100644 --- a/include/mbgl/style/expression/within.hpp +++ b/include/mbgl/style/expression/within.hpp @@ -1,11 +1,8 @@ #pragma once -#include <mbgl/style/conversion.hpp> #include <mbgl/style/expression/expression.hpp> -#include <mbgl/style/expression/parsing_context.hpp> #include <mbgl/util/geojson.hpp> - -#include <memory> +#include <mbgl/util/optional.hpp> namespace mbgl { namespace style { diff --git a/src/mbgl/style/expression/within.cpp b/src/mbgl/style/expression/within.cpp index 0447dfe228..7dc55eda7f 100644 --- a/src/mbgl/style/expression/within.cpp +++ b/src/mbgl/style/expression/within.cpp @@ -2,7 +2,7 @@ #include <mapbox/geojson.hpp> #include <mapbox/geometry.hpp> -#include <mbgl/style/conversion_impl.hpp> +#include <mbgl/style/conversion/json.hpp> #include <mbgl/tile/geometry_tile_data.hpp> #include <mbgl/util/geometry_within.hpp> @@ -10,7 +10,6 @@ #include <mbgl/util/string.hpp> #include <rapidjson/document.h> -#include <mbgl/style/conversion/json.hpp> namespace mbgl { namespace { diff --git a/src/mbgl/util/geometry_within.cpp b/src/mbgl/util/geometry_within.cpp index bb62047077..344e15b5d7 100644 --- a/src/mbgl/util/geometry_within.cpp +++ b/src/mbgl/util/geometry_within.cpp @@ -1,5 +1,4 @@ #include <mbgl/util/geometry_within.hpp> -#include <mbgl/util/logging.hpp> namespace mbgl { diff --git a/test/style/property_expression.test.cpp b/test/style/property_expression.test.cpp index 672cff44f5..88096bab6b 100644 --- a/test/style/property_expression.test.cpp +++ b/test/style/property_expression.test.cpp @@ -266,7 +266,7 @@ TEST(PropertyExpression, WithinExpression) { PropertyExpression<bool> propExpr(std::move(expression)); // evaluation test with valid geojson source but FeatureType is not Point/LineString (currently only support - // FeatureType::Point) + // FeatureType::Point and FeatureType::LineString) { // testPoly is inside polygon, but will return false Polygon<double> testRing{{{-9.228515625, -17.560246503294888}, @@ -280,12 +280,12 @@ TEST(PropertyExpression, WithinExpression) { } // evaluation test with valid geojson source and valid linestring features { - // testLine is inside polygon, but will return true + // testLine is inside polygon LineString<double> testLine0{{-9.228515625, -17.560246503294888}, {-2.4609375, -16.04581345375217}}; auto geoLine0 = convertGeometry(testLine0, canonicalTileID); StubGeometryTileFeature lineFeature0(FeatureType::LineString, geoLine0); - // testLine is intersecting polygon even though end points are all inside polygon, but will return false + // testLine is intersecting polygon even though end points are all inside polygon, will return false LineString<double> testLine1{{-10.4150390625, -10.082445532162465}, {-8.8275146484375, -9.194292714912638}}; auto geoLine1 = convertGeometry(testLine1, canonicalTileID); StubGeometryTileFeature lineFeature1(FeatureType::LineString, geoLine1); |