Simplification: the [] operator already inserts the new element
See https://en.cppreference.com/w/cpp/container/map/operator_atissue#70
parent
f41e681122
commit
be023bdab9
|
@ -3631,11 +3631,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
|
||||||
// Write Pac equation tag info
|
// Write Pac equation tag info
|
||||||
map<string, vector<pair<string, string>>> for_writing;
|
map<string, vector<pair<string, string>>> for_writing;
|
||||||
for (auto & it : pac_eqtag_and_lag)
|
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)
|
for (auto & it : for_writing)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue