summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-02-08 23:46:41 -0800
committerLei Zhang <thestig@chromium.org>2016-02-08 23:46:41 -0800
commit56cf589f6ecc85a84c183956bdcb071ec16567d9 (patch)
tree9fb3783aa4f2368c57ca6c5b3d4ca8ccd46602bb
parent5413f1d4e1770d0635ee11dd6451e6fb1b46be85 (diff)
downloadpdfium-56cf589f6ecc85a84c183956bdcb071ec16567d9.tar.xz
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 .
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp2
1 files changed, 1 insertions, 1 deletions
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()));