summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_Context.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-07-24 08:26:49 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-24 08:26:50 -0700
commit0024a22b4a793630a1a8e8d85c4525c7b82a3ed7 (patch)
tree09cc3dc3ff26e231a82787c602834cdf2da26fb0 /core/fxcodec/jbig2/JBig2_Context.cpp
parent9f515bcccb40e8ae251bbe8afc1ef6c4db1f05a8 (diff)
downloadpdfium-0024a22b4a793630a1a8e8d85c4525c7b82a3ed7.tar.xz
Remove CFX_Deletable
Change the last use of CFX_Deletable to its actual type and remove the use of CFX_Deletable. Review-Url: https://codereview.chromium.org/2178613002
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Context.cpp')
-rw-r--r--core/fxcodec/jbig2/JBig2_Context.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp
index 1e4c35a625..256ce3910a 100644
--- a/core/fxcodec/jbig2/JBig2_Context.cpp
+++ b/core/fxcodec/jbig2/JBig2_Context.cpp
@@ -591,7 +591,8 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment,
if (it->first == key) {
std::unique_ptr<CJBig2_SymbolDict> copy(it->second->DeepCopy());
pSegment->m_Result.sd = copy.release();
- m_pSymbolDictCache->push_front(*it);
+ m_pSymbolDictCache->push_front(
+ CJBig2_CachePair(key, std::move(it->second)));
m_pSymbolDictCache->erase(it);
cache_hit = true;
break;
@@ -621,11 +622,10 @@ int32_t CJBig2_Context::parseSymbolDict(CJBig2_Segment* pSegment,
pSegment->m_Result.sd->DeepCopy();
int size = pdfium::CollectionSize<int>(*m_pSymbolDictCache);
while (size >= kSymbolDictCacheMaxSize) {
- delete m_pSymbolDictCache->back().second;
m_pSymbolDictCache->pop_back();
--size;
}
- m_pSymbolDictCache->push_front(CJBig2_CachePair(key, value.release()));
+ m_pSymbolDictCache->push_front(CJBig2_CachePair(key, std::move(value)));
}
}
if (wFlags & 0x0200) {