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

Unified Diff: fpdfsdk/fpdf_flatten.cpp

Issue 2066043002: Simplify CPDF_TextPage::FindTextlineFlowOrientation(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: less loops Created 4 years, 6 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/fpdftext/fpdf_text_int.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdf_flatten.cpp
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index bc1a1ccc60676fba5f5561e85b7c706e6fb2177e..7d2d23a921f53c4f3233a8ea36bec4557687835f 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -48,10 +48,7 @@ void GetContentsRect(CPDF_Document* pDoc,
std::unique_ptr<CPDF_Page> pPDFPage(new CPDF_Page(pDoc, pDict, false));
pPDFPage->ParseContent();
- for (auto& pPageObject : *pPDFPage->GetPageObjectList()) {
- if (!pPageObject)
- continue;
-
+ for (const auto& pPageObject : *pPDFPage->GetPageObjectList()) {
CFX_FloatRect rc;
rc.left = pPageObject->m_Left;
rc.right = pPageObject->m_Right;
« no previous file with comments | « core/fpdftext/fpdf_text_int.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698