| 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_BASE_HASH_PAIR_H_ | 7 #ifndef CC_BASE_HASH_PAIR_H_ |
| 8 #define CC_BASE_HASH_PAIR_H_ | 8 #define CC_BASE_HASH_PAIR_H_ |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
| 14 | 14 |
| 15 #if defined(COMPILER_MSVC) | 15 #if defined(COMPILER_MSVC) |
| 16 | 16 |
| 17 #define DEFINE_PAIR_HASH_FUNCTION_START(type1, type2) \ | 17 #define DEFINE_PAIR_HASH_FUNCTION_START(type1, type2) \ |
| 18 template<> \ | 18 template<> \ |
| 19 inline std::size_t hash_value<std::pair<type1, type2> >( \ | 19 inline std::size_t hash_value<std::pair<type1, type2> >( \ |
| 20 const std::pair<type1, type2>& value) | 20 const std::pair<type1, type2>& value) |
| 21 | 21 |
| 22 #define DEFINE_PAIR_HASH_FUNCTION_END() | 22 #define DEFINE_PAIR_HASH_FUNCTION_END() |
| 23 | 23 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 DEFINE_64BIT_PAIR_HASH(uint64, int64); | 144 DEFINE_64BIT_PAIR_HASH(uint64, int64); |
| 145 DEFINE_64BIT_PAIR_HASH(uint64, uint64); | 145 DEFINE_64BIT_PAIR_HASH(uint64, uint64); |
| 146 | 146 |
| 147 #undef DEFINE_64BIT_PAIR_HASH | 147 #undef DEFINE_64BIT_PAIR_HASH |
| 148 } | 148 } |
| 149 | 149 |
| 150 #undef DEFINE_PAIR_HASH_FUNCTION_START | 150 #undef DEFINE_PAIR_HASH_FUNCTION_START |
| 151 #undef DEFINE_PAIR_HASH_FUNCTION_END | 151 #undef DEFINE_PAIR_HASH_FUNCTION_END |
| 152 | 152 |
| 153 #endif // CC_BASE_HASH_PAIR_H_ | 153 #endif // CC_BASE_HASH_PAIR_H_ |
| OLD | NEW |