diff options
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_SddProc.cpp')
-rw-r--r-- | core/fxcodec/jbig2/JBig2_SddProc.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fxcodec/jbig2/JBig2_SddProc.cpp b/core/fxcodec/jbig2/JBig2_SddProc.cpp index 7e9ace2046..d27ff680d5 100644 --- a/core/fxcodec/jbig2/JBig2_SddProc.cpp +++ b/core/fxcodec/jbig2/JBig2_SddProc.cpp @@ -18,6 +18,7 @@ #include "core/fxcodec/jbig2/JBig2_SymbolDict.h" #include "core/fxcodec/jbig2/JBig2_TrdProc.h" #include "core/fxcrt/fx_basic.h" +#include "third_party/base/ptr_util.h" CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith( CJBig2_ArithDecoder* pArithDecoder, @@ -59,7 +60,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith( while ((uint32_t)(1 << nTmp) < (SDNUMINSYMS + SDNUMNEWSYMS)) { nTmp++; } - IAID.reset(new CJBig2_ArithIaidDecoder((uint8_t)nTmp)); + IAID = pdfium::MakeUnique<CJBig2_ArithIaidDecoder>((uint8_t)nTmp); SDNEWSYMS = FX_Alloc(CJBig2_Image*, SDNUMNEWSYMS); FXSYS_memset(SDNEWSYMS, 0, SDNUMNEWSYMS * sizeof(CJBig2_Image*)); @@ -258,7 +259,7 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Arith( goto failed; } - pDict.reset(new CJBig2_SymbolDict); + pDict = pdfium::MakeUnique<CJBig2_SymbolDict>(); I = J = 0; for (I = 0; I < SDNUMINSYMS + SDNUMNEWSYMS; I++) { if (EXFLAGS[I] && J < SDNUMEXSYMS) { @@ -562,8 +563,8 @@ CJBig2_SymbolDict* CJBig2_SDDProc::decode_Huffman( } EXINDEX = 0; CUREXFLAG = 0; - pTable.reset(new CJBig2_HuffmanTable(HuffmanTable_B1, HuffmanTable_B1_Size, - HuffmanTable_HTOOB_B1)); + pTable = pdfium::MakeUnique<CJBig2_HuffmanTable>( + HuffmanTable_B1, HuffmanTable_B1_Size, HuffmanTable_HTOOB_B1); EXFLAGS = FX_Alloc(bool, SDNUMINSYMS + SDNUMNEWSYMS); num_ex_syms = 0; while (EXINDEX < SDNUMINSYMS + SDNUMNEWSYMS) { |