summaryrefslogtreecommitdiff
path: root/xfa/fee/fde_txtedtengine.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-17 13:42:51 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-17 13:42:51 -0700
commit8bdb290b9301200aeafa8b89678e690166ba1ce6 (patch)
treed4f6e474169f0a3ce1e435ac5571883bacb10f57 /xfa/fee/fde_txtedtengine.cpp
parent992def065be348d6f8157fab75aee312f5f45558 (diff)
downloadpdfium-8bdb290b9301200aeafa8b89678e690166ba1ce6.tar.xz
Remove Release() from IFX_CharIter, use unique_ptrs.chromium/2742chromium/2741
Review-Url: https://codereview.chromium.org/1986373002
Diffstat (limited to 'xfa/fee/fde_txtedtengine.cpp')
-rw-r--r--xfa/fee/fde_txtedtengine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fee/fde_txtedtengine.cpp b/xfa/fee/fde_txtedtengine.cpp
index 71f510205b..826f0ce62c 100644
--- a/xfa/fee/fde_txtedtengine.cpp
+++ b/xfa/fee/fde_txtedtengine.cpp
@@ -954,7 +954,8 @@ void CFDE_TxtEdtEngine::RebuildParagraphs() {
FX_WCHAR wChar = L' ';
int32_t nParagStart = 0;
int32_t nIndex = 0;
- IFX_CharIter* pIter = new CFDE_TxtEdtBufIter((CFDE_TxtEdtBuf*)m_pTxtBuf);
+ std::unique_ptr<IFX_CharIter> pIter(
+ new CFDE_TxtEdtBufIter(static_cast<CFDE_TxtEdtBuf*>(m_pTxtBuf)));
pIter->SetAt(0);
do {
wChar = pIter->GetChar();
@@ -968,7 +969,6 @@ void CFDE_TxtEdtEngine::RebuildParagraphs() {
nParagStart = nIndex + 1;
}
} while (pIter->Next());
- pIter->Release();
}
void CFDE_TxtEdtEngine::RemoveAllParags() {