mirror of
https://github.com/electron/electron.git
synced 2026-01-23 22:38:18 -05:00
Adapt to changes on hash functions of Chrome 50
This commit is contained in:
@@ -14,22 +14,6 @@
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "v8/include/v8-profiler.h"
|
||||
|
||||
// Following code should be removed after we upgraded to Chrome 50.
|
||||
#if !defined(COMPILER_MSVC)
|
||||
namespace base {
|
||||
|
||||
template <typename T1, typename T2>
|
||||
inline size_t HashInts(T1 value1, T2 value2) {
|
||||
// This condition is expected to be compile-time evaluated and optimised away
|
||||
// in release builds.
|
||||
if (sizeof(T1) > sizeof(uint32_t) || (sizeof(T2) > sizeof(uint32_t)))
|
||||
return HashInts64(value1, value2);
|
||||
|
||||
return HashInts32(value1, value2);
|
||||
}
|
||||
|
||||
} // namespace base
|
||||
|
||||
namespace std {
|
||||
|
||||
// The hash function used by DoubleIDWeakMap.
|
||||
@@ -41,7 +25,6 @@ struct hash<std::pair<Type1, Type2>> {
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
#endif // defined(COMPILER_MSVC)
|
||||
|
||||
namespace mate {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user