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

Unified Diff: Source/core/html/parser/HTMLFormattingElementList.cpp

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use nullptr Created 6 years, 1 month 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
Index: Source/core/html/parser/HTMLFormattingElementList.cpp
diff --git a/Source/core/html/parser/HTMLFormattingElementList.cpp b/Source/core/html/parser/HTMLFormattingElementList.cpp
index 938e1a440ecb39897c47a599aeb54eb69fde7fe7..78507d517b3ed7c03a6ae7af6edd42df99d5d28f 100644
--- a/Source/core/html/parser/HTMLFormattingElementList.cpp
+++ b/Source/core/html/parser/HTMLFormattingElementList.cpp
@@ -50,11 +50,11 @@ Element* HTMLFormattingElementList::closestElementInScopeWithName(const AtomicSt
for (unsigned i = 1; i <= m_entries.size(); ++i) {
const Entry& entry = m_entries[m_entries.size() - i];
if (entry.isMarker())
- return 0;
+ return nullptr;
if (entry.stackItem()->matchesHTMLTag(targetName))
return entry.element();
}
- return 0;
+ return nullptr;
}
bool HTMLFormattingElementList::contains(Element* element)
@@ -69,7 +69,7 @@ HTMLFormattingElementList::Entry* HTMLFormattingElementList::find(Element* eleme
// This is somewhat of a hack, and is why this method can't be const.
return &m_entries[index];
}
- return 0;
+ return nullptr;
}
HTMLFormattingElementList::Bookmark HTMLFormattingElementList::bookmarkFor(Element* element)
@@ -123,7 +123,7 @@ void HTMLFormattingElementList::clearToLastMarker()
}
}
-void HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly(HTMLStackItem* newItem, WillBeHeapVector<RawPtrWillBeMember<HTMLStackItem> >& remainingCandidates)
+void HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly(HTMLStackItem* newItem, WillBeHeapVector<RawPtrWillBeMember<HTMLStackItem>>& remainingCandidates)
{
ASSERT(remainingCandidates.isEmpty());
@@ -160,14 +160,14 @@ void HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly(HTMLStackIte
void HTMLFormattingElementList::ensureNoahsArkCondition(HTMLStackItem* newItem)
{
- WillBeHeapVector<RawPtrWillBeMember<HTMLStackItem> > candidates;
+ WillBeHeapVector<RawPtrWillBeMember<HTMLStackItem>> candidates;
tryToEnsureNoahsArkConditionQuickly(newItem, candidates);
if (candidates.isEmpty())
return;
// We pre-allocate and re-use this second vector to save one malloc per
// attribute that we verify.
- WillBeHeapVector<RawPtrWillBeMember<HTMLStackItem> > remainingCandidates;
+ WillBeHeapVector<RawPtrWillBeMember<HTMLStackItem>> remainingCandidates;
remainingCandidates.reserveInitialCapacity(candidates.size());
const Vector<Attribute>& attributes = newItem->attributes();

Powered by Google App Engine
This is Rietveld 408576698