+ return bvalue by const ref
+ feature impl update
This commit is contained in:
parent
657cfa20d3
commit
cb070f7b1d
1 changed files with 3 additions and 10 deletions
|
@ -30,8 +30,6 @@
|
|||
|
||||
namespace mapnik {
|
||||
|
||||
static mapnik::value _null_value;
|
||||
|
||||
struct attribute
|
||||
{
|
||||
std::string name_;
|
||||
|
@ -39,16 +37,11 @@ struct attribute
|
|||
: name_(name) {}
|
||||
|
||||
template <typename V ,typename F>
|
||||
V value(F const& f) const
|
||||
V const& value(F const& f) const
|
||||
{
|
||||
typedef typename F::const_iterator const_iterator;
|
||||
const_iterator itr = f.find(name_);
|
||||
if (itr != f.end())
|
||||
{
|
||||
return itr->second;
|
||||
}
|
||||
return _null_value;
|
||||
return f.get(name_);
|
||||
}
|
||||
|
||||
std::string const& name() const { return name_;}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue