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

Unified Diff: Source/core/layout/line/LineBoxList.cpp

Issue 1162383003: C++11: Replace 0 with nullptr where applicable in layout code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add one more file. Created 5 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 | « Source/core/layout/line/LineBoxList.h ('k') | Source/core/layout/line/LineInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/LineBoxList.cpp
diff --git a/Source/core/layout/line/LineBoxList.cpp b/Source/core/layout/line/LineBoxList.cpp
index 4f391d5a96c5bec31fc48c130183cf14b4e0896a..ccf8c35921a2df998eaae06eac0984f319ab6623 100644
--- a/Source/core/layout/line/LineBoxList.cpp
+++ b/Source/core/layout/line/LineBoxList.cpp
@@ -71,7 +71,7 @@ void LineBoxList::deleteLineBoxTree()
line->deleteLine();
line = nextLine;
}
- m_firstLineBox = m_lastLineBox = 0;
+ m_firstLineBox = m_lastLineBox = nullptr;
}
void LineBoxList::extractLineBox(InlineFlowBox* box)
@@ -80,10 +80,10 @@ void LineBoxList::extractLineBox(InlineFlowBox* box)
m_lastLineBox = box->prevLineBox();
if (box == m_firstLineBox)
- m_firstLineBox = 0;
+ m_firstLineBox = nullptr;
if (box->prevLineBox())
- box->prevLineBox()->setNextLineBox(0);
- box->setPreviousLineBox(0);
+ box->prevLineBox()->setNextLineBox(nullptr);
+ box->setPreviousLineBox(nullptr);
for (InlineFlowBox* curr = box; curr; curr = curr->nextLineBox())
curr->setExtracted();
@@ -134,8 +134,8 @@ void LineBoxList::deleteLineBoxes()
next = curr->nextLineBox();
curr->destroy();
}
- m_firstLineBox = 0;
- m_lastLineBox = 0;
+ m_firstLineBox = nullptr;
+ m_lastLineBox = nullptr;
}
}
@@ -251,8 +251,8 @@ void LineBoxList::dirtyLinesFromChangedChild(LayoutObject* container, LayoutObje
// Try to figure out which line box we belong in. First try to find a previous
// line box by examining our siblings. If we didn't find a line box, then use our
// parent's first line box.
- RootInlineBox* box = 0;
- LayoutObject* curr = 0;
+ RootInlineBox* box = nullptr;
+ LayoutObject* curr = nullptr;
for (curr = child->previousSibling(); curr; curr = curr->previousSibling()) {
if (curr->isFloatingOrOutOfFlowPositioned())
continue;
@@ -315,8 +315,8 @@ void LineBoxList::dirtyLinesFromChangedChild(LayoutObject* container, LayoutObje
void LineBoxList::checkConsistency() const
{
#ifdef CHECK_CONSISTENCY
- const InlineFlowBox* prev = 0;
- for (const InlineFlowBox* child = m_firstLineBox; child != 0; child = child->nextLineBox()) {
+ const InlineFlowBox* prev = nullptr;
+ for (const InlineFlowBox* child = m_firstLineBox; child; child = child->nextLineBox()) {
ASSERT(child->prevLineBox() == prev);
prev = child;
}
« no previous file with comments | « Source/core/layout/line/LineBoxList.h ('k') | Source/core/layout/line/LineInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698