remove unneeded get_optional method on feature impl
This commit is contained in:
parent
0d8f415070
commit
88e970841b
2 changed files with 2 additions and 11 deletions
|
@ -181,13 +181,6 @@ public:
|
|||
return default_value;
|
||||
}
|
||||
|
||||
boost::optional<value_type const&> get_optional(std::size_t index) const
|
||||
{
|
||||
if (index < data_.size())
|
||||
return boost::optional<value_type const&>(data_[index]);
|
||||
return boost::optional<value_type const&>();
|
||||
}
|
||||
|
||||
std::size_t size() const
|
||||
{
|
||||
return data_.size();
|
||||
|
|
|
@ -49,15 +49,13 @@ void feature_kv_iterator::advance(boost::iterator_difference<feature_kv_iterator
|
|||
|
||||
bool feature_kv_iterator::equal( feature_kv_iterator const& other) const
|
||||
{
|
||||
return ( itr_ == other.itr_);
|
||||
return ( itr_ == other.itr_ );
|
||||
}
|
||||
|
||||
feature_kv_iterator::value_type const& feature_kv_iterator::dereference() const
|
||||
{
|
||||
boost::get<0>(kv_) = itr_->first;
|
||||
boost::optional<mapnik::value const&> val = f_.get_optional(itr_->second);
|
||||
if (val) boost::get<1>(kv_) = *val;
|
||||
else boost::get<1>(kv_) = value_null();
|
||||
boost::get<1>(kv_) = f_.get(itr_->second);
|
||||
return kv_;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue