Simplification: the [] operator already inserts the new element

See https://en.cppreference.com/w/cpp/container/map/operator_at
issue#70
Sébastien Villemot 2019-02-21 12:15:50 +01:00
parent f41e681122
commit be023bdab9
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 1 additions and 5 deletions

View File

@ -3631,11 +3631,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
// Write Pac equation tag info
map<string, vector<pair<string, string>>> for_writing;
for (auto & it : pac_eqtag_and_lag)
{
if (for_writing.find(it.first.first) == for_writing.end())
for_writing.emplace(it.first.first, vector<pair<string, string>>());
for_writing[it.first.first].emplace_back(it.first.second, it.second.first);
}
for_writing[it.first.first].emplace_back(it.first.second, it.second.first);
for (auto & it : for_writing)
{