From 132aa6654f6cf98015d2fd6bf9c4f215e75eec0b Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 13 Jul 2016 15:07:08 +0100 Subject: [PATCH] add empty_featureset (returning feature_ptr()) implementation --- include/mapnik/featureset.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/mapnik/featureset.hpp b/include/mapnik/featureset.hpp index c6829d1eb..6886d8755 100644 --- a/include/mapnik/featureset.hpp +++ b/include/mapnik/featureset.hpp @@ -41,8 +41,23 @@ struct MAPNIK_DECL Featureset : private util::noncopyable virtual ~Featureset() {} }; + +struct MAPNIK_DECL empty_featureset final : Featureset +{ + feature_ptr next() + { + return feature_ptr(); + } + ~empty_featureset() {} +}; + using featureset_ptr = std::shared_ptr; +inline featureset_ptr make_empty_featureset() +{ + return std::make_shared(); +} + } #endif // MAPNIK_FEATURESET_HPP