mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 20:40:40 +00:00
fixed a not ideal return statement ending the function
This commit is contained in:
parent
40c53612e0
commit
056719cd44
@ -863,8 +863,8 @@ effect::effect(const unit_ability_list& list, int def, bool backstab) :
|
||||
if (const config::attribute_value *v = cfg.get("divide")) {
|
||||
if (*v == 0) {
|
||||
ERR_NG << "division by zero with division= in weapon special " << effect_id << "\n";
|
||||
return;
|
||||
}
|
||||
else {
|
||||
int divide = int(v->to_double() * 100);
|
||||
std::map<std::string,individual_effect>::iterator div_effect = values_div.find(effect_id);
|
||||
if(div_effect == values_div.end() || divide > div_effect->second.value) {
|
||||
@ -872,6 +872,7 @@ effect::effect(const unit_ability_list& list, int def, bool backstab) :
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(value_is_set && set_effect.type != NOT_USED) {
|
||||
effect_list_.push_back(set_effect);
|
||||
|
Loading…
x
Reference in New Issue
Block a user