From c5ac0202004cd38071a9f6f0d7f3e5d8669ccfbb Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 18 Feb 2016 14:55:46 -0500 Subject: Name the states for fpdf_parser_parser. Currently the states are numbers, use names instead to make the code clearer where things are transitioning too. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1715483002 . --- core/include/fpdfapi/fpdf_parser.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'core/include/fpdfapi') diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h index de32b1fb37..f57ee5593c 100644 --- a/core/include/fpdfapi/fpdf_parser.h +++ b/core/include/fpdfapi/fpdf_parser.h @@ -450,6 +450,24 @@ class CPDF_Parser { std::set m_ParsingObjNums; friend class CPDF_DataAvail; + + private: + enum class ParserState { + kDefault, + kComment, + kWhitespace, + kString, + kHexString, + kEscapedString, + kXref, + kObjNum, + kPostObjNum, + kGenNum, + kPostGenNum, + kTrailer, + kBeginObj, + kEndObj + }; }; #define FXCIPHER_NONE 0 -- cgit v1.2.3