From dbd4fdc9d952dea6b742be45b943299fff06d423 Mon Sep 17 00:00:00 2001 From: JaMiT Date: Sat, 22 Jun 2013 16:59:23 -0500 Subject: [PATCH] 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. --- src/team.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/team.cpp b/src/team.cpp index cf9035fe3ee..b89de8a662c 100644 --- a/src/team.cpp +++ b/src/team.cpp @@ -148,9 +148,7 @@ void team::team_info::read(const config &cfg) } std::vector recruits = utils::split(cfg["recruit"]); - for(std::vector::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)