diff options
author | Artem Strygin <art-snake@yandex-team.ru> | 2017-09-07 18:25:08 +0300 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-07 15:38:39 +0000 |
commit | 38371fe908e14a1362d6e5a5bfa38bc5ea92daec (patch) | |
tree | 803e7facd234086171eab4a16b333c66bc9fe2d6 /core/fpdfapi/parser | |
parent | cf7df1bfba955f48f1f70211e55dc0d5c87afcfe (diff) | |
download | pdfium-38371fe908e14a1362d6e5a5bfa38bc5ea92daec.tar.xz |
Simplify CPDF_SyntaxParser::GetNextWordInternal.
Use CPDF_SyntaxParser::ToNextWord to move position on word start.
Change-Id: I6b63efc9027b2a4eb4749561bf8ce2b95527d03b
Reviewed-on: https://pdfium-review.googlesource.com/12830
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r-- | core/fpdfapi/parser/cpdf_syntax_parser.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp index c3ebbdaee9..f7c79bc950 100644 --- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp +++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp @@ -125,27 +125,11 @@ void CPDF_SyntaxParser::GetNextWordInternal(bool* bIsNumber) { if (bIsNumber) *bIsNumber = true; + ToNextWord(); uint8_t ch; if (!GetNextChar(ch)) return; - while (1) { - while (PDFCharIsWhitespace(ch)) { - if (!GetNextChar(ch)) - return; - } - - if (ch != '%') - break; - - while (1) { - if (!GetNextChar(ch)) - return; - if (PDFCharIsLineEnding(ch)) - break; - } - } - if (PDFCharIsDelimiter(ch)) { if (bIsNumber) *bIsNumber = false; |