From 5171a27eaa7489939310bd2864864867cc78ce21 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 1 Jun 2017 12:29:09 -0700 Subject: Use unique_ptrs for codec contexts in ccodec_progressivedecoder. Change-Id: I4deaf8ca946c2dcb6842c5702b02eed1c22b1201 Reviewed-on: https://pdfium-review.googlesource.com/6191 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- core/fxcodec/codec/ccodec_jpegmodule.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'core/fxcodec/codec/ccodec_jpegmodule.h') diff --git a/core/fxcodec/codec/ccodec_jpegmodule.h b/core/fxcodec/codec/ccodec_jpegmodule.h index 276e46a55f..a5837177f2 100644 --- a/core/fxcodec/codec/ccodec_jpegmodule.h +++ b/core/fxcodec/codec/ccodec_jpegmodule.h @@ -21,7 +21,10 @@ class CFX_DIBAttribute; class CCodec_JpegModule { public: - class Context; + class Context { + public: + virtual ~Context() {} + }; std::unique_ptr CreateDecoder(const uint8_t* src_buf, uint32_t src_size, @@ -36,8 +39,8 @@ class CCodec_JpegModule { int* num_components, int* bits_per_components, bool* color_transform); - Context* Start(); - void Finish(Context* pContext); + + std::unique_ptr Start(); void Input(Context* pContext, const uint8_t* src_buf, uint32_t src_size); #ifndef PDF_ENABLE_XFA -- cgit v1.2.3