commit | 56cf589f6ecc85a84c183956bdcb071ec16567d9 | [log] [tgz] |
---|---|---|
author | Lei Zhang <thestig@chromium.org> | Mon Feb 08 23:46:41 2016 -0800 |
committer | Lei Zhang <thestig@chromium.org> | Mon Feb 08 23:46:41 2016 -0800 |
tree | 9fb3783aa4f2368c57ca6c5b3d4ca8ccd46602bb | |
parent | 5413f1d4e1770d0635ee11dd6451e6fb1b46be85 [diff] |
Fix for-loop which results in no-op The existing code (added in https://codereview.chromium.org/1650793002/) changes the state of a copy of the object. Original CL: https://codereview.chromium.org/1679783002/ Original Author: hashimoto@chromium.org R=hashimoto@chromium.org Review URL: https://codereview.chromium.org/1681863002 .
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index f170b20..9d646b2 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -973,7 +973,7 @@ if (bMainXRef) { m_pTrailer = ToDictionary(pStream->GetDict()->Clone()); ShrinkObjectMap(size); - for (auto it : m_ObjectInfo) + for (auto& it : m_ObjectInfo) it.second.type = 0; } else { m_Trailers.Add(ToDictionary(pStream->GetDict()->Clone()));