fix is_valid logic (ref #3494)

This commit is contained in:
artemp 2016-08-15 12:49:43 +01:00
parent 046c9638e1
commit b9279feee2
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@ inline featureset_ptr make_invalid_featureset()
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;
}
}

View file

@ -107,7 +107,7 @@ TEST_CASE("geojson") {
auto ds = mapnik::datasource_cache::instance().create(params);
CHECK(ds != nullptr);
auto fs = all_features(ds);
REQUIRE(mapnik::is_valid(fs));
REQUIRE(!mapnik::is_valid(fs));
while (auto f = fs->next())
{
CHECK(false); // shouldn't get here