From 17453d03c3bdd18a893ae86058a6184939aee026 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Thu, 13 Jul 2017 10:06:15 -0400 Subject: More unique_ptrs in JBig2 code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL makes CJBig2_Segment own the results: symbol, pattern, huffman, and huffman. This causes a lot more unique_ptr usage in JBig2 code. Change-Id: I1f0a5bfaaf85053658b467bef5325c72d1f496c7 Reviewed-on: https://pdfium-review.googlesource.com/7690 Commit-Queue: Nicolás Peña Reviewed-by: Lei Zhang --- core/fxcodec/jbig2/JBig2_HtrdProc.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'core/fxcodec/jbig2/JBig2_HtrdProc.h') diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.h b/core/fxcodec/jbig2/JBig2_HtrdProc.h index e562123098..eff25a67bb 100644 --- a/core/fxcodec/jbig2/JBig2_HtrdProc.h +++ b/core/fxcodec/jbig2/JBig2_HtrdProc.h @@ -7,6 +7,8 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_ #define CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_ +#include + #include "core/fxcodec/jbig2/JBig2_Image.h" #include "core/fxcrt/fx_system.h" @@ -17,11 +19,11 @@ struct JBig2ArithCtx; class CJBig2_HTRDProc { public: - CJBig2_Image* decode_Arith(CJBig2_ArithDecoder* pArithDecoder, - JBig2ArithCtx* gbContext, - IFX_Pause* pPause); + std::unique_ptr decode_Arith(CJBig2_ArithDecoder* pArithDecoder, + JBig2ArithCtx* gbContext, + IFX_Pause* pPause); - CJBig2_Image* decode_MMR(CJBig2_BitStream* pStream); + std::unique_ptr decode_MMR(CJBig2_BitStream* pStream); public: uint32_t HBW; -- cgit v1.2.3