summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_PatternDict.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_PatternDict.cpp')
-rw-r--r--core/fxcodec/jbig2/JBig2_PatternDict.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/core/fxcodec/jbig2/JBig2_PatternDict.cpp b/core/fxcodec/jbig2/JBig2_PatternDict.cpp
index cd6a2ad3c2..450e78a8fa 100644
--- a/core/fxcodec/jbig2/JBig2_PatternDict.cpp
+++ b/core/fxcodec/jbig2/JBig2_PatternDict.cpp
@@ -8,16 +8,7 @@
#include "core/fxcrt/fx_memory.h"
-CJBig2_PatternDict::CJBig2_PatternDict() {
- NUMPATS = 0;
- HDPATS = nullptr;
-}
+CJBig2_PatternDict::CJBig2_PatternDict(uint32_t dict_size)
+ : NUMPATS(dict_size), HDPATS(dict_size) {}
-CJBig2_PatternDict::~CJBig2_PatternDict() {
- if (HDPATS) {
- for (uint32_t i = 0; i < NUMPATS; i++) {
- delete HDPATS[i];
- }
- FX_Free(HDPATS);
- }
-}
+CJBig2_PatternDict::~CJBig2_PatternDict() {}