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

Unified Diff: Source/platform/text/SegmentedString.h

Issue 1320813002: SegmentedString: Use decrementAndCheckLength where possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/SegmentedString.h
diff --git a/Source/platform/text/SegmentedString.h b/Source/platform/text/SegmentedString.h
index 88ffb605caae433f8f3e524b58b758c778e92196..fe4e288b98f24248a490227f3b39c18f25bbf505 100644
--- a/Source/platform/text/SegmentedString.h
+++ b/Source/platform/text/SegmentedString.h
@@ -219,12 +219,7 @@ public:
if (m_fastPathFlags & Use8BitAdvance) {
ASSERT(!m_pushedChar1);
m_currentChar = m_currentString.incrementAndGetCurrentChar8();
- m_currentString.decrementLength();
- if (!m_currentString.haveOneCharacterLeft())
- return;
-
- updateSlowCaseFunctionPointers();
-
+ decrementAndCheckLength();
return;
}
@@ -238,17 +233,13 @@ public:
bool haveNewLine = (m_currentChar == '\n') & !!(m_fastPathFlags & Use8BitAdvanceAndUpdateLineNumbers);
m_currentChar = m_currentString.incrementAndGetCurrentChar8();
- m_currentString.decrementLength();
- bool haveOneCharacterLeft = m_currentString.haveOneCharacterLeft();
+ decrementAndCheckLength();
if (haveNewLine) {
tkent 2015/08/27 03:08:01 This block doesn't refer to data members updated b
++m_currentLine;
m_numberOfCharactersConsumedPriorToCurrentLine = m_numberOfCharactersConsumedPriorToCurrentString + m_currentString.numberOfCharactersConsumed();
}
- if (haveOneCharacterLeft)
- updateSlowCaseFunctionPointers();
-
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698