+ avoid unnecessary const_cast<>

This commit is contained in:
artemp 2013-02-12 19:53:16 +00:00
parent 56c0fb6982
commit b247082b78

View file

@ -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);
}
}
}