optimize rule::active which is called in loop in feature_style_processor_impl

This commit is contained in:
Dane Springmeyer 2013-09-19 20:24:59 -07:00
parent 9df4deac73
commit 0619477238
2 changed files with 4 additions and 6 deletions

View file

@ -168,7 +168,10 @@ public:
bool has_else_filter() const;
void set_also(bool also_filter);
bool has_also_filter() const;
bool active(double scale) const;
inline bool active(double scale) const
{
return ( scale >= min_scale_ - 1e-6 && scale < max_scale_ + 1e-6 && !syms_.empty());
}
private:

View file

@ -266,9 +266,4 @@ bool rule::has_also_filter() const
return also_filter_;
}
bool rule::active(double scale) const
{
return ( !syms_.empty() && scale >= min_scale_ - 1e-6 && scale < max_scale_ + 1e-6);
}
}