diff options
author | Lei Zhang <thestig@chromium.org> | 2015-10-01 13:16:29 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-10-01 13:16:29 -0700 |
commit | ce37d7347f1ab4c9fc1f48a137628da641bb4f14 (patch) | |
tree | 59ebc7104280eab908822dee182fdefd8a928f95 /core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h | |
parent | 953f5c5f3858ce20ea5f28e0045c201148fba036 (diff) | |
download | pdfium-ce37d7347f1ab4c9fc1f48a137628da641bb4f14.tar.xz |
Cleanup JBig2_ArithIntDecoder.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1359013003 .
Diffstat (limited to 'core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h')
-rw-r--r-- | core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h index ca8e181da7..f31636b77c 100644 --- a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h +++ b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h @@ -4,33 +4,36 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef _JBIG2_ARITH_INT_DECODER_H_ -#define _JBIG2_ARITH_INT_DECODER_H_ +#ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHINTDECODER_H_ +#define CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHINTDECODER_H_ +#include <vector> + +#include "../../../include/fxcrt/fx_system.h" #include "JBig2_ArithDecoder.h" class CJBig2_ArithIntDecoder { public: CJBig2_ArithIntDecoder(); - ~CJBig2_ArithIntDecoder(); - int decode(CJBig2_ArithDecoder* pArithDecoder, int* nResult); + bool decode(CJBig2_ArithDecoder* pArithDecoder, int* nResult); private: - JBig2ArithCtx* IAx; + std::vector<JBig2ArithCtx> m_IAx; }; + class CJBig2_ArithIaidDecoder { public: - CJBig2_ArithIaidDecoder(unsigned char SBSYMCODELENA); - + explicit CJBig2_ArithIaidDecoder(unsigned char SBSYMCODELENA); ~CJBig2_ArithIaidDecoder(); - int decode(CJBig2_ArithDecoder* pArithDecoder, int* nResult); + void decode(CJBig2_ArithDecoder* pArithDecoder, FX_DWORD* nResult); private: - JBig2ArithCtx* IAID; + std::vector<JBig2ArithCtx> m_IAID; - unsigned char SBSYMCODELEN; + const unsigned char SBSYMCODELEN; }; -#endif + +#endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_ARITHINTDECODER_H_ |