summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_HuffmanTable.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2018-05-24 14:37:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-24 14:37:40 +0000
commit5bf772bade615d8cb3388f677d85785fe0c01824 (patch)
tree2fcdee842d114cd8dd298dd25b334bc0ce4fdeea /core/fxcodec/jbig2/JBig2_HuffmanTable.h
parent18f7fbca461254cc0df1af2ca586df42b7fd6c17 (diff)
downloadpdfium-5bf772bade615d8cb3388f677d85785fe0c01824.tar.xz
Do some variable cleanup in CJBig2_Context
This CL cleans up variables in CJBig2_Context. It moves some declarations further, to when the variables are actually used. It also caches huffman tables in a vector of unique_ptr. Change-Id: Id3af96f9526b1000f681e4e2b174bba07b45ee55 Reviewed-on: https://pdfium-review.googlesource.com/32715 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_HuffmanTable.h')
-rw-r--r--core/fxcodec/jbig2/JBig2_HuffmanTable.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/fxcodec/jbig2/JBig2_HuffmanTable.h b/core/fxcodec/jbig2/JBig2_HuffmanTable.h
index 86d925c3d4..351eb9d893 100644
--- a/core/fxcodec/jbig2/JBig2_HuffmanTable.h
+++ b/core/fxcodec/jbig2/JBig2_HuffmanTable.h
@@ -27,6 +27,8 @@ class CJBig2_HuffmanTable {
const std::vector<int>& GetRANGELOW() const { return RANGELOW; }
bool IsOK() const { return m_bOK; }
+ constexpr static size_t kNumHuffmanTables = 16;
+
private:
bool ParseFromStandardTable(size_t table_idx);
bool ParseFromCodedBuffer(CJBig2_BitStream* pStream);