fix is_valid
logic (ref #3494)
This commit is contained in:
parent
046c9638e1
commit
b9279feee2
2 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ inline featureset_ptr make_invalid_featureset()
|
||||||
|
|
||||||
inline bool is_valid(featureset_ptr const& ptr)
|
inline bool is_valid(featureset_ptr const& ptr)
|
||||||
{
|
{
|
||||||
return (dynamic_cast<invalid_featureset*>(ptr.get()) == nullptr) ? false : true;
|
return (dynamic_cast<invalid_featureset*>(ptr.get()) == nullptr) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ TEST_CASE("geojson") {
|
||||||
auto ds = mapnik::datasource_cache::instance().create(params);
|
auto ds = mapnik::datasource_cache::instance().create(params);
|
||||||
CHECK(ds != nullptr);
|
CHECK(ds != nullptr);
|
||||||
auto fs = all_features(ds);
|
auto fs = all_features(ds);
|
||||||
REQUIRE(mapnik::is_valid(fs));
|
REQUIRE(!mapnik::is_valid(fs));
|
||||||
while (auto f = fs->next())
|
while (auto f = fs->next())
|
||||||
{
|
{
|
||||||
CHECK(false); // shouldn't get here
|
CHECK(false); // shouldn't get here
|
||||||
|
|
Loading…
Reference in a new issue