| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2012, 2013 Apple Inc. All rights reserved | 2 * Copyright (C) 2006, 2007, 2008, 2012, 2013 Apple Inc. All rights reserved |
| 3 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 static unsigned hash(const LChar* data, unsigned length) | 85 static unsigned hash(const LChar* data, unsigned length) |
| 86 { | 86 { |
| 87 return StringHasher::computeHashAndMaskTop8Bits<LChar, foldCase<LCha
r> >(data, length); | 87 return StringHasher::computeHashAndMaskTop8Bits<LChar, foldCase<LCha
r> >(data, length); |
| 88 } | 88 } |
| 89 | 89 |
| 90 static inline unsigned hash(const char* data, unsigned length) | 90 static inline unsigned hash(const char* data, unsigned length) |
| 91 { | 91 { |
| 92 return CaseFoldingHash::hash(reinterpret_cast<const LChar*>(data), l
ength); | 92 return CaseFoldingHash::hash(reinterpret_cast<const LChar*>(data), l
ength); |
| 93 } | 93 } |
| 94 | 94 |
| 95 static inline bool equal(const StringImpl* a, const StringImpl* b) | 95 static inline bool equal(const StringImpl* a, const StringImpl* b) |
| 96 { | 96 { |
| 97 return equalIgnoringCaseNonNull(a, b); | 97 return equalIgnoringCaseNonNull(a, b); |
| 98 } | 98 } |
| 99 | 99 |
| 100 static unsigned hash(const RefPtr<StringImpl>& key) | 100 static unsigned hash(const RefPtr<StringImpl>& key) |
| 101 { | 101 { |
| 102 return hash(key.get()); | 102 return hash(key.get()); |
| 103 } | 103 } |
| 104 | 104 |
| 105 static bool equal(const RefPtr<StringImpl>& a, const RefPtr<StringImpl>&
b) | 105 static bool equal(const RefPtr<StringImpl>& a, const RefPtr<StringImpl>&
b) |
| 106 { | 106 { |
| 107 return equal(a.get(), b.get()); | 107 return equal(a.get(), b.get()); |
| 108 } | 108 } |
| 109 | 109 |
| 110 static unsigned hash(const String& key) | 110 static unsigned hash(const String& key) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 } | 147 } |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } | 150 } |
| 151 | 151 |
| 152 using WTF::AlreadyHashed; | 152 using WTF::AlreadyHashed; |
| 153 using WTF::CaseFoldingHash; | 153 using WTF::CaseFoldingHash; |
| 154 using WTF::StringHash; | 154 using WTF::StringHash; |
| 155 | 155 |
| 156 #endif | 156 #endif |
| OLD | NEW |