diff --git a/include/mapnik/featureset.hpp b/include/mapnik/featureset.hpp index e528d7de0..a6ad4e85d 100644 --- a/include/mapnik/featureset.hpp +++ b/include/mapnik/featureset.hpp @@ -59,7 +59,7 @@ inline featureset_ptr make_invalid_featureset() inline bool is_valid(featureset_ptr const& ptr) { - return (dynamic_cast(ptr.get()) == nullptr) ? false : true; + return (dynamic_cast(ptr.get()) == nullptr) ? true : false; } } diff --git a/test/unit/datasource/geojson.cpp b/test/unit/datasource/geojson.cpp index cf3214862..6d953c8bd 100644 --- a/test/unit/datasource/geojson.cpp +++ b/test/unit/datasource/geojson.cpp @@ -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