diff options
author | jbroman@chromium.org <jbroman@chromium.org> | 2015-06-09 23:55:04 +0000 |
---|---|---|
committer | jbroman@chromium.org <jbroman@chromium.org> | 2015-06-09 23:55:04 +0000 |
commit | 7c21c19d0f2cb73697bff28476808f3744b37782 (patch) | |
tree | 822cbebf27d93942028afc78c67abda771b297b8 /third_party/WebKit/Source/wtf/text/AtomicString.h | |
parent | d7bc48a1b2e82866eab8818ad8bce662ac61d558 (diff) | |
download | chromium_src-7c21c19d0f2cb73697bff28476808f3744b37782.zip chromium_src-7c21c19d0f2cb73697bff28476808f3744b37782.tar.gz chromium_src-7c21c19d0f2cb73697bff28476808f3744b37782.tar.bz2 |
wtf: Add missing operator==(const char*, const AtomicString&).
Because of this, the following (natural) statement would not compile in tests:
ASSERT_EQ("expected", AtomicString("actual"));
AtomicStringTest didn't catch this because it had the actual and expected values
reversed in each case that used equality.
Review URL: https://codereview.chromium.org/1175713002
git-svn-id: svn://svn.chromium.org/blink/trunk@196807 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/Source/wtf/text/AtomicString.h')
-rw-r--r-- | third_party/WebKit/Source/wtf/text/AtomicString.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/third_party/WebKit/Source/wtf/text/AtomicString.h b/third_party/WebKit/Source/wtf/text/AtomicString.h index aea437a..792344e 100644 --- a/third_party/WebKit/Source/wtf/text/AtomicString.h +++ b/third_party/WebKit/Source/wtf/text/AtomicString.h @@ -188,6 +188,7 @@ inline bool operator==(const AtomicString& a, const char* b) { return WTF::equal inline bool operator==(const AtomicString& a, const Vector<UChar>& b) { return a.impl() && equal(a.impl(), b.data(), b.size()); } inline bool operator==(const AtomicString& a, const String& b) { return equal(a.impl(), b.impl()); } inline bool operator==(const LChar* a, const AtomicString& b) { return b == a; } +inline bool operator==(const char* a, const AtomicString& b) { return b == a; } inline bool operator==(const String& a, const AtomicString& b) { return equal(a.impl(), b.impl()); } inline bool operator==(const Vector<UChar>& a, const AtomicString& b) { return b == a; } @@ -197,6 +198,7 @@ inline bool operator!=(const AtomicString& a, const char* b) { return !(a == b); inline bool operator!=(const AtomicString& a, const String& b) { return !equal(a.impl(), b.impl()); } inline bool operator!=(const AtomicString& a, const Vector<UChar>& b) { return !(a == b); } inline bool operator!=(const LChar* a, const AtomicString& b) { return !(b == a); } +inline bool operator!=(const char* a, const AtomicString& b) { return !(b == a); } inline bool operator!=(const String& a, const AtomicString& b) { return !equal(a.impl(), b.impl()); } inline bool operator!=(const Vector<UChar>& a, const AtomicString& b) { return !(a == b); } |