Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Remove unnecessary includes, fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zmiao committed Feb 19, 2020
1 parent 8a9df2e commit 9c4ee07
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
5 changes: 1 addition & 4 deletions include/mbgl/style/expression/within.hpp
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions src/mbgl/style/expression/within.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

#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>
#include <mbgl/util/logging.hpp>
#include <mbgl/util/string.hpp>

#include <rapidjson/document.h>
#include <mbgl/style/conversion/json.hpp>

namespace mbgl {
namespace {
Expand Down
1 change: 0 additions & 1 deletion src/mbgl/util/geometry_within.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <mbgl/util/geometry_within.hpp>
#include <mbgl/util/logging.hpp>

namespace mbgl {

Expand Down
17 changes: 17 additions & 0 deletions test/android/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android_</name>
<comment>Project android_ created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
6 changes: 3 additions & 3 deletions test/style/property_expression.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand All @@ -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);
Expand Down

0 comments on commit 9c4ee07

Please sign in to comment.