From 56cf589f6ecc85a84c183956bdcb071ec16567d9 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 8 Feb 2016 23:46:41 -0800 Subject: 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 . --- core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index f170b20d98..9d646b2943 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 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE* pos, FX_BOOL bMainXRef) { 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())); -- cgit v1.2.3