diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-01-10 16:35:58 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-01-10 21:50:44 +0000 |
commit | 0e6438e40a95702edb8327286c8253aa269c9826 (patch) | |
tree | 5d3b07277b5fa4a1fb96a9d2a23108a3d02bdc9e /xfa/fde/cfde_txtedtparag.cpp | |
parent | 6c0c48227aa024aa6e188ed7adf4d7c3d410cff9 (diff) | |
download | pdfium-0e6438e40a95702edb8327286c8253aa269c9826.tar.xz |
Remove custom allocator from CFDE_TxtEdtBuf.
This CL removes the custom allocator from CFDE_TxtEdtBuf and uses
std::vector<std::unique_ptr>> instead.
The Iterator code has been made an inner class of the buffer and rename to
CFDE_TxtEdtBuf::Iterator instead of CFDE_TxtEdtBufIter.
Change-Id: Ied8e844dea700e0ef37087f0d3fad4882d9eada1
Reviewed-on: https://pdfium-review.googlesource.com/2159
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_txtedtparag.cpp')
-rw-r--r-- | xfa/fde/cfde_txtedtparag.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xfa/fde/cfde_txtedtparag.cpp b/xfa/fde/cfde_txtedtparag.cpp index 244add4e0a..f9f88bfb5d 100644 --- a/xfa/fde/cfde_txtedtparag.cpp +++ b/xfa/fde/cfde_txtedtparag.cpp @@ -9,7 +9,6 @@ #include <memory> #include "xfa/fde/cfde_txtedtbuf.h" -#include "xfa/fde/cfde_txtedtbufiter.h" #include "xfa/fde/cfde_txtedtengine.h" #include "xfa/fde/ifde_txtedtengine.h" #include "xfa/fde/ifx_chariter.h" @@ -41,8 +40,8 @@ void CFDE_TxtEdtParag::LoadParag() { if (pParam->dwMode & FDE_TEXTEDITMODE_Password) { wcAlias = m_pEngine->GetAliasChar(); } - std::unique_ptr<IFX_CharIter> pIter( - new CFDE_TxtEdtBufIter(static_cast<CFDE_TxtEdtBuf*>(pTxtBuf), wcAlias)); + std::unique_ptr<IFX_CharIter> pIter(new CFDE_TxtEdtBuf::Iterator( + static_cast<CFDE_TxtEdtBuf*>(pTxtBuf), wcAlias)); pIter->SetAt(m_nCharStart); int32_t nEndIndex = m_nCharStart + m_nCharCount; CFX_ArrayTemplate<int32_t> LineBaseArr; @@ -110,7 +109,7 @@ void CFDE_TxtEdtParag::CalcLines() { uint32_t dwBreakStatus = FX_TXTBREAK_None; int32_t nEndIndex = m_nCharStart + m_nCharCount; std::unique_ptr<IFX_CharIter> pIter( - new CFDE_TxtEdtBufIter(static_cast<CFDE_TxtEdtBuf*>(pTxtBuf))); + new CFDE_TxtEdtBuf::Iterator(static_cast<CFDE_TxtEdtBuf*>(pTxtBuf))); pIter->SetAt(m_nCharStart); bool bReload = false; do { |