diff options
author | Lei Zhang <thestig@chromium.org> | 2017-11-06 18:49:21 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-06 18:49:21 +0000 |
commit | 438b1e32fb6cc096c65969405fd14cba21071d85 (patch) | |
tree | 5d997f6f5c3ac7c3689dd9bcb03002814bd7bc22 /core/fpdfapi/page/cpdf_psengine.h | |
parent | 52f011adbf4216e3507ccd5be6753762e0ff7b64 (diff) | |
download | pdfium-438b1e32fb6cc096c65969405fd14cba21071d85.tar.xz |
Remove C-style casts in CPDF_PSEngine.
Fix a few other nits.
Change-Id: I12f79b3f83d1695957ba067291f2ee03a7d189ca
Reviewed-on: https://pdfium-review.googlesource.com/17810
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_psengine.h')
-rw-r--r-- | core/fpdfapi/page/cpdf_psengine.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_psengine.h b/core/fpdfapi/page/cpdf_psengine.h index 607d81065d..0d5eadd78e 100644 --- a/core/fpdfapi/page/cpdf_psengine.h +++ b/core/fpdfapi/page/cpdf_psengine.h @@ -16,7 +16,7 @@ class CPDF_PSEngine; class CPDF_PSOP; class CPDF_SimpleParser; -enum PDF_PSOP { +enum PDF_PSOP : uint8_t { PSOP_ADD, PSOP_SUB, PSOP_MUL, @@ -63,8 +63,6 @@ enum PDF_PSOP { PSOP_CONST }; -constexpr uint32_t PSENGINE_STACKSIZE = 100; - class CPDF_PSProc { public: CPDF_PSProc(); @@ -89,10 +87,12 @@ class CPDF_PSEngine { void Reset() { m_StackCount = 0; } void Push(float value); float Pop(); + int PopInt(); uint32_t GetStackSize() const { return m_StackCount; } private: - float m_Stack[PSENGINE_STACKSIZE]; + static constexpr uint32_t kPSEngineStackSize = 100; + float m_Stack[kPSEngineStackSize]; uint32_t m_StackCount; CPDF_PSProc m_MainProc; }; |