apparently evaluation order is unspecified for assignment causing an off-by-one in gcc

This commit is contained in:
Thomas Fussell 2017-01-01 18:16:38 -05:00
parent cdb97fda82
commit ab1af4f73e

View File

@ -2649,7 +2649,8 @@ void xlsx_producer::write_comments(const relationship & /*rel*/, worksheet ws, c
if (authors.find(author) == authors.end()) if (authors.find(author) == authors.end())
{ {
authors[author] = authors.size(); auto author_index = authors.size();
authors[author] = author_index;
} }
} }