mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
geojson parser : add phoenix v2 not_empty implementation
This commit is contained in:
parent
2b8b71fc98
commit
9d7d024cf4
@ -177,6 +177,27 @@ struct multi_geometry_type
|
||||
return std::tuple<unsigned,bool>(type, collection);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct not_empty
|
||||
{
|
||||
template <typename T>
|
||||
struct result { typedef bool type; };
|
||||
|
||||
bool operator() (geometry_container const& cont) const
|
||||
{
|
||||
geometry_container::const_iterator itr = cont.begin();
|
||||
geometry_container::const_iterator end = cont.end();
|
||||
|
||||
for (; itr!=end; ++itr)
|
||||
{
|
||||
if (itr->size() > 0) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user