From b9425dd4ecd112f0f455b6a6950039d77305a465 Mon Sep 17 00:00:00 2001 From: zmiao Date: Wed, 19 Feb 2020 12:06:42 +0200 Subject: [PATCH] [core] Remove unnecessary includes, fix comments This reverts commit b5c386ad7708ca9fe14f219b0ffc94cf6ce8fc88. --- include/mbgl/style/expression/within.hpp | 5 +---- src/mbgl/style/expression/within.cpp | 3 +-- src/mbgl/util/geometry_within.cpp | 1 - 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 4116b60bc..37e27f494 100644 --- a/include/mbgl/style/expression/within.hpp +++ b/include/mbgl/style/expression/within.hpp @@ -1,11 +1,8 @@ #pragma once -#include #include -#include #include - -#include +#include namespace mbgl { namespace style { diff --git a/src/mbgl/style/expression/within.cpp b/src/mbgl/style/expression/within.cpp index 0447dfe22..7dc55eda7 100644 --- a/src/mbgl/style/expression/within.cpp +++ b/src/mbgl/style/expression/within.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include @@ -10,7 +10,6 @@ #include #include -#include namespace mbgl { namespace { diff --git a/src/mbgl/util/geometry_within.cpp b/src/mbgl/util/geometry_within.cpp index bb6204707..344e15b5d 100644 --- a/src/mbgl/util/geometry_within.cpp +++ b/src/mbgl/util/geometry_within.cpp @@ -1,5 +1,4 @@ #include -#include namespace mbgl { diff --git a/test/style/property_expression.test.cpp b/test/style/property_expression.test.cpp index 672cff44f..88096bab6 100644 --- a/test/style/property_expression.test.cpp +++ b/test/style/property_expression.test.cpp @@ -266,7 +266,7 @@ TEST(PropertyExpression, WithinExpression) { PropertyExpression 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 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 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 testLine1{{-10.4150390625, -10.082445532162465}, {-8.8275146484375, -9.194292714912638}}; auto geoLine1 = convertGeometry(testLine1, canonicalTileID); StubGeometryTileFeature lineFeature1(FeatureType::LineString, geoLine1);