From 395fbedc65e1261f1fb9189205501f4856235290 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 4 Nov 2015 13:58:14 -0500 Subject: Remove state from RebuildCrossRef state-machine. The state '12' is only used once. This CL folds the contents of state 12 back into the place where we set our state to 12. This works because all state 12 does is decrement the loop counter so we process the same character again and move us to state 0. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1430643007 . --- core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index f5ada7c6eb..db0e8b19e1 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -926,17 +926,10 @@ FX_BOOL CPDF_Parser::RebuildCrossRef() { } break; case 11: - if (byte == '<' && inside_index == 1) { - status = 12; - } else if (byte == '>') { + if (byte == '>' || (byte == '<' && inside_index == 1)) status = 0; - } inside_index = 0; break; - case 12: - --i; - status = 0; - break; case 13: if (PDFCharIsDelimiter(byte) || PDFCharIsWhitespace(byte)) { --i; -- cgit v1.2.3