mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-16 10:20:30 +00:00
Simplify some code.
Calling insert() on a range instead of explicitly looping. It just makes the code a little simpler for a human to read.
This commit is contained in:
parent
b42e7ff0f5
commit
dbd4fdc9d9
@ -148,9 +148,7 @@ void team::team_info::read(const config &cfg)
|
||||
}
|
||||
|
||||
std::vector<std::string> recruits = utils::split(cfg["recruit"]);
|
||||
for(std::vector<std::string>::const_iterator i = recruits.begin(); i != recruits.end(); ++i) {
|
||||
can_recruit.insert(*i);
|
||||
}
|
||||
can_recruit.insert(recruits.begin(), recruits.end());
|
||||
|
||||
// at the start of a scenario "start_gold" is not set, we need to take the
|
||||
// value from the gold setting (or fall back to the gold default)
|
||||
|
Loading…
x
Reference in New Issue
Block a user