summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-02-18 14:55:46 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-02-18 14:55:46 -0500
commitc5ac0202004cd38071a9f6f0d7f3e5d8669ccfbb (patch)
tree70b68fc5dd773db90b9b2e5d8b14297c85da51c7 /core/include
parent61046b948a7a15a605147635d317ff3bb27fb452 (diff)
downloadpdfium-c5ac0202004cd38071a9f6f0d7f3e5d8669ccfbb.tar.xz
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 .
Diffstat (limited to 'core/include')
-rw-r--r--core/include/fpdfapi/fpdf_parser.h18
1 files changed, 18 insertions, 0 deletions
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<FX_DWORD> 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