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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 return CaseFoldingHash::GetHash(reinterpret_cast<const LChar*>(data), | 93 return CaseFoldingHash::GetHash(reinterpret_cast<const LChar*>(data), |
94 strlen(data)); | 94 strlen(data)); |
95 } | 95 } |
96 | 96 |
97 static inline bool Equal(const StringImpl* a, const StringImpl* b) { | 97 static inline bool Equal(const StringImpl* a, const StringImpl* b) { |
98 DCHECK(a); | 98 DCHECK(a); |
99 DCHECK(b); | 99 DCHECK(b); |
100 // Save one branch inside each StringView by derefing the StringImpl, | 100 // Save one branch inside each StringView by derefing the StringImpl, |
101 // and another branch inside the compare function by skipping the null | 101 // and another branch inside the compare function by skipping the null |
102 // checks. | 102 // checks. |
103 return EqualIgnoringCaseAndNullity(*a, *b); | 103 return DeprecatedEqualIgnoringCaseAndNullity(*a, *b); |
104 } | 104 } |
105 | 105 |
106 static unsigned GetHash(const RefPtr<StringImpl>& key) { | 106 static unsigned GetHash(const RefPtr<StringImpl>& key) { |
107 return GetHash(key.Get()); | 107 return GetHash(key.Get()); |
108 } | 108 } |
109 | 109 |
110 static bool Equal(const RefPtr<StringImpl>& a, const RefPtr<StringImpl>& b) { | 110 static bool Equal(const RefPtr<StringImpl>& a, const RefPtr<StringImpl>& b) { |
111 return Equal(a.Get(), b.Get()); | 111 return Equal(a.Get(), b.Get()); |
112 } | 112 } |
113 | 113 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 }; | 160 }; |
161 | 161 |
162 } // namespace WTF | 162 } // namespace WTF |
163 | 163 |
164 using WTF::AlreadyHashed; | 164 using WTF::AlreadyHashed; |
165 using WTF::CaseFoldingHash; | 165 using WTF::CaseFoldingHash; |
166 using WTF::StringHash; | 166 using WTF::StringHash; |
167 | 167 |
168 #endif | 168 #endif |
OLD | NEW |