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

Unified Diff: core/src/fpdfdoc/pdf_vt.h

Issue 1090693002: Replace FX_NEW with new, remove tests in fpdfdoc. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typo. 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/fpdfdoc/doc_vtmodule.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/pdf_vt.h
diff --git a/core/src/fpdfdoc/pdf_vt.h b/core/src/fpdfdoc/pdf_vt.h
index f910dfd3720ed1ed4db692bea0f19e39a4173d51..19c75479ea6c3b008950d0db2d9c890413bb2b92 100644
--- a/core/src/fpdfdoc/pdf_vt.h
+++ b/core/src/fpdfdoc/pdf_vt.h
@@ -106,14 +106,14 @@ struct CPVT_SectionInfo {
if (pSecProps) {
*pSecProps = *other.pSecProps;
} else {
- pSecProps = FX_NEW CPVT_SecProps(*other.pSecProps);
+ pSecProps = new CPVT_SecProps(*other.pSecProps);
}
}
if (other.pWordProps) {
if (pWordProps) {
*pWordProps = *other.pWordProps;
} else {
- pWordProps = FX_NEW CPVT_WordProps(*other.pWordProps);
+ pWordProps = new CPVT_WordProps(*other.pWordProps);
}
}
}
@@ -169,7 +169,7 @@ struct CPVT_WordInfo {
if (pWordProps) {
*pWordProps = *word.pWordProps;
} else {
- pWordProps = FX_NEW CPVT_WordProps(*word.pWordProps);
+ pWordProps = new CPVT_WordProps(*word.pWordProps);
}
}
}
@@ -258,18 +258,13 @@ public:
FX_INT32 Add(const CPVT_LineInfo & lineinfo)
{
if (m_nTotal >= GetSize()) {
- if (CLine * pLine = FX_NEW CLine) {
- pLine->m_LineInfo = lineinfo;
- m_Lines.Add(pLine);
- return m_nTotal++;
- }
- return m_nTotal;
- } else {
- if (CLine * pLine = GetAt(m_nTotal)) {
- pLine->m_LineInfo = lineinfo;
- }
- return m_nTotal++;
+ CLine* pLine = new CLine;
+ pLine->m_LineInfo = lineinfo;
+ m_Lines.Add(pLine);
+ } else if (CLine* pLine = GetAt(m_nTotal)) {
+ pLine->m_LineInfo = lineinfo;
}
+ return m_nTotal++;
}
void Clear()
{
« no previous file with comments | « core/src/fpdfdoc/doc_vtmodule.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698