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

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page.cpp

Issue 1143663008: Merge to XFA: Remove FX_Alloc() null checks now that it can't return NULL. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Rebased. Created 5 years, 7 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/fpdfapi/fpdf_edit/fpdf_edit_image.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_page/fpdf_page.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
index 4ec753d75188b585441b483b46e84795b6787936..5a9f1a8cb8887620b4b85834e998e5a510bbcd80 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -204,11 +204,10 @@ void CPDF_TextObject::CopyData(const CPDF_PageObject* pSrc)
if (m_nChars > 1) {
m_pCharCodes = FX_Alloc(FX_DWORD, m_nChars);
m_pCharPos = FX_Alloc(FX_FLOAT, m_nChars - 1);
- int i;
- for (i = 0; i < m_nChars; i ++) {
+ for (int i = 0; i < m_nChars; i ++) {
m_pCharCodes[i] = pSrcObj->m_pCharCodes[i];
}
- for (i = 0; i < m_nChars - 1; i ++) {
+ for (int i = 0; i < m_nChars - 1; i ++) {
m_pCharPos[i] = pSrcObj->m_pCharPos[i];
}
} else {
« no previous file with comments | « core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698