use emplace instead of insert and emplace_back instead of push_back

issue#70
Houtan Bastani 2019-02-21 10:59:53 +01:00
parent 84104a695e
commit f41e681122
No known key found for this signature in database
GPG Key ID: 000094FB955BE169
1 changed files with 2 additions and 2 deletions

View File

@ -3633,8 +3633,8 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
for (auto & it : pac_eqtag_and_lag)
{
if (for_writing.find(it.first.first) == for_writing.end())
for_writing.insert(pair<string,vector<pair<string,string>> >(it.first.first, vector<pair<string,string>>()));
for_writing[it.first.first].push_back({it.first.second, it.second.first});
for_writing.emplace(it.first.first, vector<pair<string, string>>());
for_writing[it.first.first].emplace_back(it.first.second, it.second.first);
}
for (auto & it : for_writing)