diff options
author | Lei Zhang <thestig@chromium.org> | 2018-09-17 19:15:30 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-09-17 19:15:30 +0000 |
commit | a828c6a9af31ccdb52189f819cd82b2f53bef38d (patch) | |
tree | 9cbc91ea33ed2c665a36ed2c6eb82f58fd574123 /core/fxcodec/jbig2/JBig2_ArithDecoder.h | |
parent | 231320c4acdcc2404e495ace6cb14f33f591b629 (diff) | |
download | pdfium-a828c6a9af31ccdb52189f819cd82b2f53bef38d.tar.xz |
Use more booleans within JBig2ArithCtx.
Change-Id: I41535238715926795f5c588dcae0834bf3a789d0
Reviewed-on: https://pdfium-review.googlesource.com/42606
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_ArithDecoder.h')
-rw-r--r-- | core/fxcodec/jbig2/JBig2_ArithDecoder.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/fxcodec/jbig2/JBig2_ArithDecoder.h b/core/fxcodec/jbig2/JBig2_ArithDecoder.h index 0a233237b2..c2fed50187 100644 --- a/core/fxcodec/jbig2/JBig2_ArithDecoder.h +++ b/core/fxcodec/jbig2/JBig2_ArithDecoder.h @@ -12,6 +12,7 @@ #include "core/fxcrt/unowned_ptr.h" class CJBig2_BitStream; +struct JBig2ArithQe; class JBig2ArithCtx { public: @@ -19,7 +20,7 @@ class JBig2ArithCtx { uint16_t Qe; uint8_t NMPS; uint8_t NLPS; - uint8_t nSwitch; + bool bSwitch; }; JBig2ArithCtx(); @@ -27,11 +28,11 @@ class JBig2ArithCtx { int DecodeNLPS(const JBig2ArithQe& qe); int DecodeNMPS(const JBig2ArithQe& qe); - unsigned int MPS() const { return m_MPS; } + unsigned int MPS() const { return m_MPS ? 1 : 0; } unsigned int I() const { return m_I; } private: - unsigned int m_MPS = 0; + bool m_MPS = 0; unsigned int m_I = 0; }; |