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

Unified Diff: Source/wtf/text/WTFString.h

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/wtf/text/TextPosition.cpp ('k') | Source/wtf/text/WTFString.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/WTFString.h
diff --git a/Source/wtf/text/WTFString.h b/Source/wtf/text/WTFString.h
index 39657169c076654d13a999403a7108dea3459ce2..6f114f35bafb6c3decdc4e6f2b6c396f5673f300 100644
--- a/Source/wtf/text/WTFString.h
+++ b/Source/wtf/text/WTFString.h
@@ -214,34 +214,34 @@ public:
// Find a single character or string, also with match function & latin1 forms.
size_t find(UChar c, unsigned start = 0) const
- { return m_impl ? m_impl->find(c, start) : notFound; }
+ { return m_impl ? m_impl->find(c, start) : kNotFound; }
size_t find(const String& str) const
- { return m_impl ? m_impl->find(str.impl()) : notFound; }
+ { return m_impl ? m_impl->find(str.impl()) : kNotFound; }
size_t find(const String& str, unsigned start) const
- { return m_impl ? m_impl->find(str.impl(), start) : notFound; }
+ { return m_impl ? m_impl->find(str.impl(), start) : kNotFound; }
size_t find(CharacterMatchFunctionPtr matchFunction, unsigned start = 0) const
- { return m_impl ? m_impl->find(matchFunction, start) : notFound; }
+ { return m_impl ? m_impl->find(matchFunction, start) : kNotFound; }
size_t find(const LChar* str, unsigned start = 0) const
- { return m_impl ? m_impl->find(str, start) : notFound; }
+ { return m_impl ? m_impl->find(str, start) : kNotFound; }
size_t findNextLineStart(unsigned start = 0) const
- { return m_impl ? m_impl->findNextLineStart(start) : notFound; }
+ { return m_impl ? m_impl->findNextLineStart(start) : kNotFound; }
// Find the last instance of a single character or string.
size_t reverseFind(UChar c, unsigned start = UINT_MAX) const
- { return m_impl ? m_impl->reverseFind(c, start) : notFound; }
+ { return m_impl ? m_impl->reverseFind(c, start) : kNotFound; }
size_t reverseFind(const String& str, unsigned start = UINT_MAX) const
- { return m_impl ? m_impl->reverseFind(str.impl(), start) : notFound; }
+ { return m_impl ? m_impl->reverseFind(str.impl(), start) : kNotFound; }
// Case insensitive string matching.
size_t findIgnoringCase(const LChar* str, unsigned start = 0) const
- { return m_impl ? m_impl->findIgnoringCase(str, start) : notFound; }
+ { return m_impl ? m_impl->findIgnoringCase(str, start) : kNotFound; }
size_t findIgnoringCase(const String& str, unsigned start = 0) const
- { return m_impl ? m_impl->findIgnoringCase(str.impl(), start) : notFound; }
+ { return m_impl ? m_impl->findIgnoringCase(str.impl(), start) : kNotFound; }
size_t reverseFindIgnoringCase(const String& str, unsigned start = UINT_MAX) const
- { return m_impl ? m_impl->reverseFindIgnoringCase(str.impl(), start) : notFound; }
+ { return m_impl ? m_impl->reverseFindIgnoringCase(str.impl(), start) : kNotFound; }
// Wrappers for find & reverseFind adding dynamic sensitivity check.
size_t find(const LChar* str, unsigned start, bool caseSensitive) const
@@ -265,9 +265,9 @@ public:
UChar32 characterStartingAt(unsigned) const;
- bool contains(UChar c) const { return find(c) != notFound; }
- bool contains(const LChar* str, bool caseSensitive = true) const { return find(str, 0, caseSensitive) != notFound; }
- bool contains(const String& str, bool caseSensitive = true) const { return find(str, 0, caseSensitive) != notFound; }
+ bool contains(UChar c) const { return find(c) != kNotFound; }
+ bool contains(const LChar* str, bool caseSensitive = true) const { return find(str, 0, caseSensitive) != kNotFound; }
+ bool contains(const String& str, bool caseSensitive = true) const { return find(str, 0, caseSensitive) != kNotFound; }
bool startsWith(const String& s, bool caseSensitive = true) const
{ return m_impl ? m_impl->startsWith(s.impl(), caseSensitive) : s.isEmpty(); }
« no previous file with comments | « Source/wtf/text/TextPosition.cpp ('k') | Source/wtf/text/WTFString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698