summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-24 16:20:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-24 16:20:29 -0700
commitddffb57cf9763e2612e9f6f5730f334691adb692 (patch)
tree9f7798eb5eb71fb5cb40aadc1da940891c71aa0b /core/fxcodec/codec
parent5aaa9bc9193d74bb188dd1f890140cf38fb06605 (diff)
downloadpdfium-ddffb57cf9763e2612e9f6f5730f334691adb692.tar.xz
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
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r--core/fxcodec/codec/fx_codec_jbig.cpp8
1 files changed, 4 insertions, 4 deletions
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<CJBig2_CachePair>* 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<CFX_DestructObject*>(pModulePrivateData);
- return static_cast<JBig2DocumentContext*>(pDestructObject);
+ CFX_Deletable* pDeletable =
+ reinterpret_cast<CFX_Deletable*>(pModulePrivateData);
+ return static_cast<JBig2DocumentContext*>(pDeletable);
}
JBig2DocumentContext* pJBig2DocumentContext = new JBig2DocumentContext();
pPrivateData->SetPrivateObj(pModule, pJBig2DocumentContext);