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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h

Issue 2107503002: Add missing const on CSSTokenizerInputStream methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h b/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
index 5d5e7c80a0b1cd6cfa6c21f2c4c7b21be5882a4c..df45945aca42eba2ae54db02658e914c19c90b22 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
@@ -14,27 +14,28 @@ class CSSTokenizerInputStream {
WTF_MAKE_NONCOPYABLE(CSSTokenizerInputStream);
USING_FAST_MALLOC(CSSTokenizerInputStream);
public:
- CSSTokenizerInputStream(String input);
+ explicit CSSTokenizerInputStream(String input);
- UChar peek(unsigned);
- inline UChar nextInputChar()
- {
- return peek(0);
- }
+ UChar peek(unsigned) const;
+ UChar nextInputChar() const { return peek(0); }
// For fast-path code, don't replace nulls with replacement characters
- UChar peekWithoutReplacement(unsigned lookaheadOffset)
+ UChar peekWithoutReplacement(unsigned lookaheadOffset) const
{
- ASSERT((m_offset + lookaheadOffset) <= m_stringLength);
+ DCHECK((m_offset + lookaheadOffset) <= m_stringLength);
if ((m_offset + lookaheadOffset) == m_stringLength)
return '\0';
return (*m_string)[m_offset + lookaheadOffset];
}
void advance(unsigned offset = 1) { m_offset += offset; }
- void pushBack(UChar);
+ void pushBack(UChar cc)
+ {
+ --m_offset;
+ DCHECK(nextInputChar() == cc);
+ }
- double getDouble(unsigned start, unsigned end);
+ double getDouble(unsigned start, unsigned end) const;
template<bool characterPredicate(UChar)>
unsigned skipWhilePredicate(unsigned offset)
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698