feature_kv_iterator - change logic in 'increment' to skip key/value's when value doesn't exist

This commit is contained in:
artemp 2016-07-14 09:46:37 +01:00
parent c457d93804
commit 3397b8f14f
2 changed files with 7 additions and 3 deletions

View file

@ -46,7 +46,7 @@ class feature_impl;
class MAPNIK_DECL feature_kv_iterator :
public boost::iterator_facade<feature_kv_iterator,
std::tuple<std::string , value> const,
std::tuple<std::string, value> const,
boost::forward_traversal_tag>
{
public:

View file

@ -39,16 +39,20 @@ feature_kv_iterator::feature_kv_iterator (feature_impl const& f, bool begin)
void feature_kv_iterator::increment()
{
++itr_;
for ( ;itr_ != f_.ctx_->end(); ++itr_)
{
if (f_.has_key(itr_->first)) break;
}
}
void feature_kv_iterator::decrement()
{
// dummy //--itr_;
// no-op //--itr_;
}
void feature_kv_iterator::advance(boost::iterator_difference<feature_kv_iterator>::type )
{
// dummy
// no-op
}
bool feature_kv_iterator::equal( feature_kv_iterator const& other) const