feature_kv_iterator - change logic in 'increment' to skip key/value's when value doesn't exist
This commit is contained in:
parent
c457d93804
commit
3397b8f14f
2 changed files with 7 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue