+ avoid unnecessary const_cast<>
This commit is contained in:
parent
56c0fb6982
commit
b247082b78
1 changed files with 5 additions and 5 deletions
|
@ -161,21 +161,21 @@ void feature_type_style::update_rule_cache(double scale_denom)
|
|||
else_rules_.clear();
|
||||
also_rules_.clear();
|
||||
|
||||
BOOST_FOREACH(rule const& r, rules_)
|
||||
BOOST_FOREACH(rule & r, rules_)
|
||||
{
|
||||
if (r.active(scale_denom))
|
||||
{
|
||||
if (r.has_else_filter())
|
||||
{
|
||||
else_rules_.push_back(const_cast<rule*>(&r));
|
||||
else_rules_.push_back(&r);
|
||||
}
|
||||
else if (r.has_also_filter())
|
||||
{
|
||||
also_rules_.push_back(const_cast<rule*>(&r));
|
||||
also_rules_.push_back(&r);
|
||||
}
|
||||
else
|
||||
{
|
||||
if_rules_.push_back(const_cast<rule*>(&r));
|
||||
if_rules_.push_back(&r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue