summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-03-24 12:16:40 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-03-27 14:05:41 +0000
commit780f5529f0ed234def78e0e19e30c1a29ecc6b2f (patch)
treeb65b2c90df0c1d07064d4072fc991bd8f0263dc1 /xfa
parentfcc309e618fea8b61a2757e2f75aac4233020013 (diff)
downloadpdfium-780f5529f0ed234def78e0e19e30c1a29ecc6b2f.tar.xz
kill another CFX_ArrayTemplate in cfde_txtedtengine.cpp
Change-Id: I87521aa9bdc796895f1db144fda22b1cb44d2089 Reviewed-on: https://pdfium-review.googlesource.com/3215 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 76d26a7b74..d4acd06ec5 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -1062,23 +1062,22 @@ bool CFDE_TxtEdtEngine::ReplaceParagEnd(wchar_t*& lpText,
void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString& wsText) const {
wchar_t wc = (m_nFirstLineEnd == FDE_TXTEDIT_LINEEND_CR) ? L'\n' : L'\r';
if (m_nFirstLineEnd == FDE_TXTEDIT_LINEEND_CRLF) {
- CFX_ArrayTemplate<int32_t> PosArr;
+ std::vector<int32_t> PosArr;
int32_t nLength = wsText.GetLength();
- int32_t i = 0;
wchar_t* lpPos = const_cast<wchar_t*>(wsText.c_str());
- for (i = 0; i < nLength; i++, lpPos++) {
+ for (int32_t i = 0; i < nLength; i++, lpPos++) {
if (*lpPos == m_wLineEnd) {
*lpPos = wc;
- PosArr.Add(i);
+ PosArr.push_back(i);
}
}
const wchar_t* lpSrcBuf = wsText.c_str();
CFX_WideString wsTemp;
- int32_t nCount = PosArr.GetSize();
+ int32_t nCount = pdfium::CollectionSize<int32_t>(PosArr);
wchar_t* lpDstBuf = wsTemp.GetBuffer(nLength + nCount);
int32_t nDstPos = 0;
int32_t nSrcPos = 0;
- for (i = 0; i < nCount; i++) {
+ for (int32_t i = 0; i < nCount; i++) {
int32_t nPos = PosArr[i];
int32_t nCopyLen = nPos - nSrcPos + 1;
FXSYS_memcpy(lpDstBuf + nDstPos, lpSrcBuf + nSrcPos,