better not to rely on implicit conversion to bool but use pointer comparison with nullptr
This commit is contained in:
parent
e5f1379fea
commit
793a2f9ffb
1 changed files with 4 additions and 4 deletions
|
@ -47,7 +47,7 @@ mapnik::datasource_ptr get_csv_ds(std::string const &file_name, bool strict = tr
|
||||||
params["strict"] = mapnik::value_bool(strict);
|
params["strict"] = mapnik::value_bool(strict);
|
||||||
auto ds = mapnik::datasource_cache::instance().create(params);
|
auto ds = mapnik::datasource_cache::instance().create(params);
|
||||||
// require a non-null pointer returned
|
// require a non-null pointer returned
|
||||||
REQUIRE(bool(ds));
|
REQUIRE(ds != nullptr);
|
||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue