From ddffb57cf9763e2612e9f6f5730f334691adb692 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 24 May 2016 16:20:29 -0700 Subject: Remove CFX_PrivateData from CPDF_ModuleMgr Its only used to store one object, so replace it with a unique_ptr to a class with a virtual dtor. Rename the prototypical class with virtual dtor from CFX_DestructObject to CFX_Deletable. Rename the fx_basic_module.cpp to cfx_modulemgr.cpp to match the one class in it. Review-Url: https://codereview.chromium.org/2013483003 --- core/fxcodec/codec/fx_codec_jbig.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fxcodec/codec/fx_codec_jbig.cpp') diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp index b5e32f130d..99cf2ec82f 100644 --- a/core/fxcodec/codec/fx_codec_jbig.cpp +++ b/core/fxcodec/codec/fx_codec_jbig.cpp @@ -30,7 +30,7 @@ class CCodec_Jbig2Context { } // namespace // Holds per-document JBig2 related data. -class JBig2DocumentContext : public CFX_DestructObject { +class JBig2DocumentContext : public CFX_Deletable { public: std::list* GetSymbolDictCache() { return &m_SymbolDictCache; @@ -50,9 +50,9 @@ JBig2DocumentContext* GetJBig2DocumentContext(CCodec_Jbig2Module* pModule, CFX_PrivateData* pPrivateData) { void* pModulePrivateData = pPrivateData->GetPrivateData(pModule); if (pModulePrivateData) { - CFX_DestructObject* pDestructObject = - reinterpret_cast(pModulePrivateData); - return static_cast(pDestructObject); + CFX_Deletable* pDeletable = + reinterpret_cast(pModulePrivateData); + return static_cast(pDeletable); } JBig2DocumentContext* pJBig2DocumentContext = new JBig2DocumentContext(); pPrivateData->SetPrivateObj(pModule, pJBig2DocumentContext); -- cgit v1.2.3