better not to rely on implicit conversion to bool but use pointer comparison with nullptr

This commit is contained in:
artemp 2015-06-10 11:42:34 +01:00
parent e5f1379fea
commit 793a2f9ffb

View file

@ -47,7 +47,7 @@ mapnik::datasource_ptr get_csv_ds(std::string const &file_name, bool strict = tr
params["strict"] = mapnik::value_bool(strict);
auto ds = mapnik::datasource_cache::instance().create(params);
// require a non-null pointer returned
REQUIRE(bool(ds));
REQUIRE(ds != nullptr);
return ds;
}