| 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, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 * | 19 * |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef StringHash_h | 22 #ifndef StringHash_h |
| 23 #define StringHash_h | 23 #define StringHash_h |
| 24 | 24 |
| 25 #include "wtf/Allocator.h" | 25 #include "platform/wtf/Allocator.h" |
| 26 #include "wtf/HashTraits.h" | 26 #include "platform/wtf/HashTraits.h" |
| 27 #include "wtf/StringHasher.h" | 27 #include "platform/wtf/StringHasher.h" |
| 28 #include "wtf/text/AtomicString.h" | 28 #include "platform/wtf/text/AtomicString.h" |
| 29 | 29 |
| 30 namespace WTF { | 30 namespace WTF { |
| 31 | 31 |
| 32 inline bool HashTraits<String>::isEmptyValue(const String& value) { | 32 inline bool HashTraits<String>::isEmptyValue(const String& value) { |
| 33 return value.isNull(); | 33 return value.isNull(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 // The hash() functions on StringHash and CaseFoldingHash do not support null | 36 // The hash() functions on StringHash and CaseFoldingHash do not support null |
| 37 // strings. get(), contains(), and add() on HashMap<String,..., StringHash> | 37 // strings. get(), contains(), and add() on HashMap<String,..., StringHash> |
| 38 // cause a null-pointer dereference when passed null strings. | 38 // cause a null-pointer dereference when passed null strings. |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 } | 154 } |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 } // namespace WTF | 157 } // namespace WTF |
| 158 | 158 |
| 159 using WTF::AlreadyHashed; | 159 using WTF::AlreadyHashed; |
| 160 using WTF::CaseFoldingHash; | 160 using WTF::CaseFoldingHash; |
| 161 using WTF::StringHash; | 161 using WTF::StringHash; |
| 162 | 162 |
| 163 #endif | 163 #endif |
| OLD | NEW |