Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Unified Diff: core/src/reflow/reflowedtextpage.cpp

Issue 1084613006: Fix all remaining instances of FX_NEW. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/reflow/reflowedpage.cpp ('k') | core/src/reflow/reflowengine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/reflow/reflowedtextpage.cpp
diff --git a/core/src/reflow/reflowedtextpage.cpp b/core/src/reflow/reflowedtextpage.cpp
index a5ad0be948206d69cdf51cfa25c6888e3aee42a4..26f5ff0ec27010ded9c91f7484133d38b626cfa2 100644
--- a/core/src/reflow/reflowedtextpage.cpp
+++ b/core/src/reflow/reflowedtextpage.cpp
@@ -7,7 +7,7 @@
#include "reflowedtextpage.h"
IPDF_TextPage* IPDF_TextPage::CreateReflowTextPage(IPDF_ReflowedPage* pRefPage)
{
- return FX_NEW CRF_TextPage(pRefPage);
+ return new CRF_TextPage(pRefPage);
}
CRF_TextPage::CRF_TextPage(IPDF_ReflowedPage* pRefPage)
{
@@ -32,24 +32,14 @@ FX_BOOL CRF_TextPage::ParseTextPage()
return FALSE;
}
int count = m_pRefPage->m_pReflowed->GetSize();
- if(count < 500) {
- m_pDataList = FX_NEW CRF_CharDataPtrArray(count);
- } else {
- m_pDataList = FX_NEW CRF_CharDataPtrArray(500);
- }
- if (NULL == m_pDataList) {
- return FALSE;
- }
+ m_pDataList = new CRF_CharDataPtrArray(count < 500 ? count : 500);
Lei Zhang 2015/04/17 21:58:53 std::min()
Tom Sepez 2015/04/17 22:14:45 Done.
for(int i = 0; i < count; i++) {
CRF_Data* pData = (*(m_pRefPage->m_pReflowed))[i];
if(pData->GetType() == CRF_Data::Text) {
m_pDataList->Add((CRF_CharData*)pData);
}
}
- m_CountBSArray = FX_NEW CFX_CountBSINT32Array(20);
- if(NULL == m_CountBSArray) {
- return FALSE;
- }
+ m_CountBSArray = new CFX_CountBSINT32Array(20);
return TRUE;
}
FX_BOOL CRF_TextPage::IsParsered() const
« no previous file with comments | « core/src/reflow/reflowedpage.cpp ('k') | core/src/reflow/reflowengine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698