Use emplace_* functions where in-place construction is preferable

This commit is contained in:
Lioncash
2015-02-04 10:36:42 -05:00
parent 012a4c18ff
commit e07679114b
12 changed files with 18 additions and 18 deletions

View File

@ -203,7 +203,7 @@ IniFile::Section* IniFile::GetOrCreateSection(const std::string& sectionName)
Section* section = GetSection(sectionName);
if (!section)
{
sections.push_back(Section(sectionName));
sections.emplace_back(sectionName);
section = &sections.back();
}
return section;

View File

@ -101,7 +101,7 @@ void ReadReplacements(replace_v& replacements)
std::string replacement;
while (f >> letter >> replacement && replacement.size())
replacements.push_back(std::make_pair(letter, replacement));
replacements.emplace_back(letter, replacement);
}
}