diff options
author | Lei Zhang <thestig@chromium.org> | 2017-12-01 22:52:42 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-12-01 22:52:42 +0000 |
commit | b8d86800487df4021860f08407c323ed82243c79 (patch) | |
tree | ac91e7e9405cf47594316623b26a0aadd9544e79 /core/fpdfapi/page/cpdf_streamparser.cpp | |
parent | dca380ffe0571be4023b11b06b8aecad9934bb06 (diff) | |
download | pdfium-b8d86800487df4021860f08407c323ed82243c79.tar.xz |
Get rid of else after break/continue/return.chromium/3284chromium/3283
Change-Id: I3efc57cd7325d16e3ca8ebdeeaec06012b2c56e3
Reviewed-on: https://pdfium-review.googlesource.com/20110
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamparser.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_streamparser.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp index aa1d227de0..2c7e0256f5 100644 --- a/core/fpdfapi/page/cpdf_streamparser.cpp +++ b/core/fpdfapi/page/cpdf_streamparser.cpp @@ -499,7 +499,13 @@ ByteString CPDF_StreamParser::ReadString() { status = 2; break; } - if (ch == 'n') { + if (ch == '\r') { + status = 4; + break; + } + if (ch == '\n') { + // Do nothing. + } else if (ch == 'n') { buf << '\n'; } else if (ch == 'r') { buf << '\r'; @@ -509,10 +515,6 @@ ByteString CPDF_StreamParser::ReadString() { buf << '\b'; } else if (ch == 'f') { buf << '\f'; - } else if (ch == '\r') { - status = 4; - break; - } else if (ch == '\n') { } else { buf << static_cast<char>(ch); } |