optimize rule::active which is called in loop in feature_style_processor_impl
This commit is contained in:
parent
9df4deac73
commit
0619477238
2 changed files with 4 additions and 6 deletions
|
@ -168,7 +168,10 @@ public:
|
||||||
bool has_else_filter() const;
|
bool has_else_filter() const;
|
||||||
void set_also(bool also_filter);
|
void set_also(bool also_filter);
|
||||||
bool has_also_filter() const;
|
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:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -266,9 +266,4 @@ bool rule::has_also_filter() const
|
||||||
return also_filter_;
|
return also_filter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool rule::active(double scale) const
|
|
||||||
{
|
|
||||||
return ( !syms_.empty() && scale >= min_scale_ - 1e-6 && scale < max_scale_ + 1e-6);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue