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

Side by Side Diff: Source/wtf/text/AtomicString.h

Issue 1175713002: wtf: Add missing operator==(const char*, const AtomicString&). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: AtomicStringTest Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/wtf/text/AtomicStringTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 static AtomicString fromUTF8Internal(const char*, const char*); 182 static AtomicString fromUTF8Internal(const char*, const char*);
183 }; 183 };
184 184
185 inline bool operator==(const AtomicString& a, const AtomicString& b) { return a. impl() == b.impl(); } 185 inline bool operator==(const AtomicString& a, const AtomicString& b) { return a. impl() == b.impl(); }
186 WTF_EXPORT bool operator==(const AtomicString&, const LChar*); 186 WTF_EXPORT bool operator==(const AtomicString&, const LChar*);
187 inline bool operator==(const AtomicString& a, const char* b) { return WTF::equal (a.impl(), reinterpret_cast<const LChar*>(b)); } 187 inline bool operator==(const AtomicString& a, const char* b) { return WTF::equal (a.impl(), reinterpret_cast<const LChar*>(b)); }
188 inline bool operator==(const AtomicString& a, const Vector<UChar>& b) { return a .impl() && equal(a.impl(), b.data(), b.size()); } 188 inline bool operator==(const AtomicString& a, const Vector<UChar>& b) { return a .impl() && equal(a.impl(), b.data(), b.size()); }
189 inline bool operator==(const AtomicString& a, const String& b) { return equal(a. impl(), b.impl()); } 189 inline bool operator==(const AtomicString& a, const String& b) { return equal(a. impl(), b.impl()); }
190 inline bool operator==(const LChar* a, const AtomicString& b) { return b == a; } 190 inline bool operator==(const LChar* a, const AtomicString& b) { return b == a; }
191 inline bool operator==(const char* a, const AtomicString& b) { return b == a; }
191 inline bool operator==(const String& a, const AtomicString& b) { return equal(a. impl(), b.impl()); } 192 inline bool operator==(const String& a, const AtomicString& b) { return equal(a. impl(), b.impl()); }
192 inline bool operator==(const Vector<UChar>& a, const AtomicString& b) { return b == a; } 193 inline bool operator==(const Vector<UChar>& a, const AtomicString& b) { return b == a; }
193 194
194 inline bool operator!=(const AtomicString& a, const AtomicString& b) { return a. impl() != b.impl(); } 195 inline bool operator!=(const AtomicString& a, const AtomicString& b) { return a. impl() != b.impl(); }
195 inline bool operator!=(const AtomicString& a, const LChar* b) { return !(a == b) ; } 196 inline bool operator!=(const AtomicString& a, const LChar* b) { return !(a == b) ; }
196 inline bool operator!=(const AtomicString& a, const char* b) { return !(a == b); } 197 inline bool operator!=(const AtomicString& a, const char* b) { return !(a == b); }
197 inline bool operator!=(const AtomicString& a, const String& b) { return !equal(a .impl(), b.impl()); } 198 inline bool operator!=(const AtomicString& a, const String& b) { return !equal(a .impl(), b.impl()); }
198 inline bool operator!=(const AtomicString& a, const Vector<UChar>& b) { return ! (a == b); } 199 inline bool operator!=(const AtomicString& a, const Vector<UChar>& b) { return ! (a == b); }
199 inline bool operator!=(const LChar* a, const AtomicString& b) { return !(b == a) ; } 200 inline bool operator!=(const LChar* a, const AtomicString& b) { return !(b == a) ; }
201 inline bool operator!=(const char* a, const AtomicString& b) { return !(b == a); }
200 inline bool operator!=(const String& a, const AtomicString& b) { return !equal(a .impl(), b.impl()); } 202 inline bool operator!=(const String& a, const AtomicString& b) { return !equal(a .impl(), b.impl()); }
201 inline bool operator!=(const Vector<UChar>& a, const AtomicString& b) { return ! (a == b); } 203 inline bool operator!=(const Vector<UChar>& a, const AtomicString& b) { return ! (a == b); }
202 204
203 inline bool equalIgnoringCase(const AtomicString& a, const AtomicString& b) { re turn equalIgnoringCase(a.impl(), b.impl()); } 205 inline bool equalIgnoringCase(const AtomicString& a, const AtomicString& b) { re turn equalIgnoringCase(a.impl(), b.impl()); }
204 inline bool equalIgnoringCase(const AtomicString& a, const LChar* b) { return eq ualIgnoringCase(a.impl(), b); } 206 inline bool equalIgnoringCase(const AtomicString& a, const LChar* b) { return eq ualIgnoringCase(a.impl(), b); }
205 inline bool equalIgnoringCase(const AtomicString& a, const char* b) { return equ alIgnoringCase(a.impl(), reinterpret_cast<const LChar*>(b)); } 207 inline bool equalIgnoringCase(const AtomicString& a, const char* b) { return equ alIgnoringCase(a.impl(), reinterpret_cast<const LChar*>(b)); }
206 inline bool equalIgnoringCase(const AtomicString& a, const String& b) { return e qualIgnoringCase(a.impl(), b.impl()); } 208 inline bool equalIgnoringCase(const AtomicString& a, const String& b) { return e qualIgnoringCase(a.impl(), b.impl()); }
207 inline bool equalIgnoringCase(const LChar* a, const AtomicString& b) { return eq ualIgnoringCase(a, b.impl()); } 209 inline bool equalIgnoringCase(const LChar* a, const AtomicString& b) { return eq ualIgnoringCase(a, b.impl()); }
208 inline bool equalIgnoringCase(const char* a, const AtomicString& b) { return equ alIgnoringCase(reinterpret_cast<const LChar*>(a), b.impl()); } 210 inline bool equalIgnoringCase(const char* a, const AtomicString& b) { return equ alIgnoringCase(reinterpret_cast<const LChar*>(a), b.impl()); }
209 inline bool equalIgnoringCase(const String& a, const AtomicString& b) { return e qualIgnoringCase(a.impl(), b.impl()); } 211 inline bool equalIgnoringCase(const String& a, const AtomicString& b) { return e qualIgnoringCase(a.impl(), b.impl()); }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 using WTF::AtomicString; 250 using WTF::AtomicString;
249 using WTF::nullAtom; 251 using WTF::nullAtom;
250 using WTF::emptyAtom; 252 using WTF::emptyAtom;
251 using WTF::starAtom; 253 using WTF::starAtom;
252 using WTF::xmlAtom; 254 using WTF::xmlAtom;
253 using WTF::xmlnsAtom; 255 using WTF::xmlnsAtom;
254 using WTF::xlinkAtom; 256 using WTF::xlinkAtom;
255 257
256 #include "wtf/text/StringConcatenate.h" 258 #include "wtf/text/StringConcatenate.h"
257 #endif // AtomicString_h 259 #endif // AtomicString_h
OLDNEW
« no previous file with comments | « no previous file | Source/wtf/text/AtomicStringTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698