Skip to content

Commit

Permalink
fix is_valid logic (ref #3494)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemp committed Aug 15, 2016
1 parent 046c963 commit b9279fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/mapnik/featureset.hpp
Expand Up @@ -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;
}

}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/datasource/geojson.cpp
Expand Up @@ -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
Expand Down

0 comments on commit b9279fe

Please sign in to comment.