summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_TrdProc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_TrdProc.cpp')
-rw-r--r--core/fxcodec/jbig2/JBig2_TrdProc.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/core/fxcodec/jbig2/JBig2_TrdProc.cpp b/core/fxcodec/jbig2/JBig2_TrdProc.cpp
index 1fa4373d79..84042dbd8c 100644
--- a/core/fxcodec/jbig2/JBig2_TrdProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_TrdProc.cpp
@@ -12,6 +12,7 @@
#include "core/fxcodec/jbig2/JBig2_ArithIntDecoder.h"
#include "core/fxcodec/jbig2/JBig2_GrrdProc.h"
#include "core/fxcodec/jbig2/JBig2_HuffmanDecoder.h"
+#include "third_party/base/ptr_util.h"
CJBig2_Image* CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream* pStream,
JBig2ArithCtx* grContext) {
@@ -242,16 +243,16 @@ CJBig2_Image* CJBig2_TRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
pIARDY = pIDS->IARDY;
pIAID = pIDS->IAID;
} else {
- IADT.reset(new CJBig2_ArithIntDecoder());
- IAFS.reset(new CJBig2_ArithIntDecoder());
- IADS.reset(new CJBig2_ArithIntDecoder());
- IAIT.reset(new CJBig2_ArithIntDecoder());
- IARI.reset(new CJBig2_ArithIntDecoder());
- IARDW.reset(new CJBig2_ArithIntDecoder());
- IARDH.reset(new CJBig2_ArithIntDecoder());
- IARDX.reset(new CJBig2_ArithIntDecoder());
- IARDY.reset(new CJBig2_ArithIntDecoder());
- IAID.reset(new CJBig2_ArithIaidDecoder(SBSYMCODELEN));
+ IADT = pdfium::MakeUnique<CJBig2_ArithIntDecoder>();
+ IAFS = pdfium::MakeUnique<CJBig2_ArithIntDecoder>();
+ IADS = pdfium::MakeUnique<CJBig2_ArithIntDecoder>();
+ IAIT = pdfium::MakeUnique<CJBig2_ArithIntDecoder>();
+ IARI = pdfium::MakeUnique<CJBig2_ArithIntDecoder>();
+ IARDW = pdfium::MakeUnique<CJBig2_ArithIntDecoder>();
+ IARDH = pdfium::MakeUnique<CJBig2_ArithIntDecoder>();
+ IARDX = pdfium::MakeUnique<CJBig2_ArithIntDecoder>();
+ IARDY = pdfium::MakeUnique<CJBig2_ArithIntDecoder>();
+ IAID = pdfium::MakeUnique<CJBig2_ArithIaidDecoder>(SBSYMCODELEN);
pIADT = IADT.get();
pIAFS = IAFS.get();
pIADS = IADS.get();