OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2008, 2010, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008, 2010, 2013 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 return; | 67 return; |
68 } | 68 } |
69 | 69 |
70 m_pendingCharacter = character; | 70 m_pendingCharacter = character; |
71 m_hasPendingCharacter = true; | 71 m_hasPendingCharacter = true; |
72 } | 72 } |
73 | 73 |
74 void addCharacters(UChar a, UChar b) | 74 void addCharacters(UChar a, UChar b) |
75 { | 75 { |
76 if (m_hasPendingCharacter) { | 76 if (m_hasPendingCharacter) { |
77 #if ASSERT_ENABLED | 77 #if ENABLE(ASSERT) |
78 m_hasPendingCharacter = false; | 78 m_hasPendingCharacter = false; |
79 #endif | 79 #endif |
80 addCharactersAssumingAligned(m_pendingCharacter, a); | 80 addCharactersAssumingAligned(m_pendingCharacter, a); |
81 m_pendingCharacter = b; | 81 m_pendingCharacter = b; |
82 #if ASSERT_ENABLED | 82 #if ENABLE(ASSERT) |
83 m_hasPendingCharacter = true; | 83 m_hasPendingCharacter = true; |
84 #endif | 84 #endif |
85 return; | 85 return; |
86 } | 86 } |
87 | 87 |
88 addCharactersAssumingAligned(a, b); | 88 addCharactersAssumingAligned(a, b); |
89 } | 89 } |
90 | 90 |
91 template<typename T, UChar Converter(T)> void addCharactersAssumingAligned(c
onst T* data, unsigned length) | 91 template<typename T, UChar Converter(T)> void addCharactersAssumingAligned(c
onst T* data, unsigned length) |
92 { | 92 { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 unsigned m_hash; | 230 unsigned m_hash; |
231 bool m_hasPendingCharacter; | 231 bool m_hasPendingCharacter; |
232 UChar m_pendingCharacter; | 232 UChar m_pendingCharacter; |
233 }; | 233 }; |
234 | 234 |
235 } // namespace WTF | 235 } // namespace WTF |
236 | 236 |
237 using WTF::StringHasher; | 237 using WTF::StringHasher; |
238 | 238 |
239 #endif // WTF_StringHasher_h | 239 #endif // WTF_StringHasher_h |
OLD | NEW |