- for (DamageGroup::const_iterator i = tp->damageGroups.begin();
- i != tp->damageGroups.end(); ++i) {
- s16 armor = itemgroup_get(armor_groups, i->first);
- damage += i->second * rangelim(time_from_last_punch / full_punch_interval, 0.0, 1.0)
+ for (const auto &damageGroup : tp->damageGroups) {
+ s16 armor = itemgroup_get(armor_groups, damageGroup.first);
+ damage += damageGroup.second
+ * rangelim(time_from_last_punch / full_punch_interval, 0.0, 1.0)