| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Defines methods for hashing a pair of integers. | 5 // Defines methods for hashing a pair of integers. |
| 6 | 6 |
| 7 #ifndef CC_HASH_PAIR_H_ | 7 #ifndef CC_BASE_HASH_PAIR_H_ |
| 8 #define CC_HASH_PAIR_H_ | 8 #define CC_BASE_HASH_PAIR_H_ |
| 9 | 9 |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| 11 | 11 |
| 12 #if defined(COMPILER_MSVC) | 12 #if defined(COMPILER_MSVC) |
| 13 | 13 |
| 14 #define DEFINE_PAIR_HASH_FUNCTION_START(type1, type2) \ | 14 #define DEFINE_PAIR_HASH_FUNCTION_START(type1, type2) \ |
| 15 template<> \ | 15 template<> \ |
| 16 inline std::size_t hash_value<std::pair<type1, type2> >( \ | 16 inline std::size_t hash_value<std::pair<type1, type2> >( \ |
| 17 const std::pair<type1, type2>& value) | 17 const std::pair<type1, type2>& value) |
| 18 | 18 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 DEFINE_64BIT_PAIR_HASH(uint64, unsigned); | 140 DEFINE_64BIT_PAIR_HASH(uint64, unsigned); |
| 141 DEFINE_64BIT_PAIR_HASH(uint64, int64); | 141 DEFINE_64BIT_PAIR_HASH(uint64, int64); |
| 142 DEFINE_64BIT_PAIR_HASH(uint64, uint64); | 142 DEFINE_64BIT_PAIR_HASH(uint64, uint64); |
| 143 | 143 |
| 144 #undef DEFINE_64BIT_PAIR_HASH | 144 #undef DEFINE_64BIT_PAIR_HASH |
| 145 } | 145 } |
| 146 | 146 |
| 147 #undef DEFINE_PAIR_HASH_FUNCTION_START | 147 #undef DEFINE_PAIR_HASH_FUNCTION_START |
| 148 #undef DEFINE_PAIR_HASH_FUNCTION_END | 148 #undef DEFINE_PAIR_HASH_FUNCTION_END |
| 149 | 149 |
| 150 #endif // CC_HASH_PAIR_H_ | 150 #endif // CC_BASE_HASH_PAIR_H_ |
| OLD | NEW |