always return am empty featureset instead of featureset_ptr()

This commit is contained in:
artemp 2016-07-13 15:16:33 +01:00
parent 75781a999c
commit bab985dd04
9 changed files with 16 additions and 16 deletions

View file

@ -431,7 +431,7 @@ mapnik::featureset_ptr csv_datasource::features(mapnik::query const& q) const
return std::make_shared<csv_index_featureset>(filename_, filter, locator_, separator_, quote_, headers_, ctx_); return std::make_shared<csv_index_featureset>(filename_, filter, locator_, separator_, quote_, headers_, ctx_);
} }
} }
return mapnik::featureset_ptr(); return mapnik::make_empty_featureset();
} }
mapnik::featureset_ptr csv_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const mapnik::featureset_ptr csv_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const

View file

@ -587,8 +587,8 @@ mapnik::featureset_ptr geojson_datasource::features(mapnik::query const& q) cons
} }
} }
// otherwise return an empty featureset pointer // otherwise return an empty featureset
return mapnik::featureset_ptr(); return mapnik::make_empty_featureset();
} }
mapnik::featureset_ptr geojson_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const mapnik::featureset_ptr geojson_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const

View file

@ -560,7 +560,7 @@ featureset_ptr ogr_datasource::features(query const& q) const
} }
} }
return featureset_ptr(); return mapnik::make_empty_featureset();
} }
featureset_ptr ogr_datasource::features_at_point(coord2d const& pt, double tol) const featureset_ptr ogr_datasource::features_at_point(coord2d const& pt, double tol) const
@ -603,5 +603,5 @@ featureset_ptr ogr_datasource::features_at_point(coord2d const& pt, double tol)
} }
} }
return featureset_ptr(); return mapnik::make_empty_featureset();
} }

View file

@ -998,7 +998,7 @@ featureset_ptr pgraster_datasource::features_with_context(query const& q,process
} }
return featureset_ptr(); return mapnik::make_empty_featureset();
} }
@ -1011,7 +1011,7 @@ featureset_ptr pgraster_datasource::features_at_point(coord2d const& pt, double
if (pool) if (pool)
{ {
shared_ptr<Connection> conn = pool->borrowObject(); shared_ptr<Connection> conn = pool->borrowObject();
if (!conn) return featureset_ptr(); if (!conn) return mapnik::make_empty_featureset();
if (conn->isOK()) if (conn->isOK())
{ {
@ -1082,7 +1082,7 @@ featureset_ptr pgraster_datasource::features_at_point(coord2d const& pt, double
} }
} }
return featureset_ptr(); return mapnik::make_empty_featureset();
} }
box2d<double> pgraster_datasource::envelope() const box2d<double> pgraster_datasource::envelope() const

View file

@ -942,7 +942,7 @@ featureset_ptr postgis_datasource::features_with_context(query const& q,processo
} }
return featureset_ptr(); return mapnik::make_empty_featureset();
} }
@ -955,7 +955,7 @@ featureset_ptr postgis_datasource::features_at_point(coord2d const& pt, double t
if (pool) if (pool)
{ {
shared_ptr<Connection> conn = pool->borrowObject(); shared_ptr<Connection> conn = pool->borrowObject();
if (!conn) return featureset_ptr(); if (!conn) return mapnik::make_empty_featureset();
if (conn->isOK()) if (conn->isOK())
{ {
@ -1030,7 +1030,7 @@ featureset_ptr postgis_datasource::features_at_point(coord2d const& pt, double t
} }
} }
return featureset_ptr(); return mapnik::make_empty_featureset();
} }
box2d<double> postgis_datasource::envelope() const box2d<double> postgis_datasource::envelope() const

View file

@ -224,5 +224,5 @@ featureset_ptr raster_datasource::features_at_point(coord2d const&, double tol)
{ {
MAPNIK_LOG_WARN(raster) << "raster_datasource: feature_at_point not supported"; MAPNIK_LOG_WARN(raster) << "raster_datasource: feature_at_point not supported";
return featureset_ptr(); return mapnik::make_empty_featureset();
} }

View file

@ -551,7 +551,7 @@ featureset_ptr sqlite_datasource::features(query const& q) const
using_subquery_); using_subquery_);
} }
return featureset_ptr(); return mapnik::make_empty_featureset();
} }
featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double tol) const featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double tol) const
@ -631,5 +631,5 @@ featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double to
using_subquery_); using_subquery_);
} }
return featureset_ptr(); return mapnik::make_empty_featureset();
} }

View file

@ -284,7 +284,7 @@ mapnik::featureset_ptr topojson_datasource::features(mapnik::query const& q) con
} }
} }
// otherwise return an empty featureset pointer // otherwise return an empty featureset pointer
return mapnik::featureset_ptr(); return mapnik::make_empty_featureset();
} }
mapnik::featureset_ptr topojson_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const mapnik::featureset_ptr topojson_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const

View file

@ -746,7 +746,7 @@ featureset_ptr Map::query_point(unsigned index, double x, double y) const
else s << " (map has no layers)"; else s << " (map has no layers)";
throw std::out_of_range(s.str()); throw std::out_of_range(s.str());
} }
return featureset_ptr(); return mapnik::make_empty_featureset();
} }
featureset_ptr Map::query_map_point(unsigned index, double x, double y) const featureset_ptr Map::query_map_point(unsigned index, double x, double y) const