Adapt to changes on hash functions of Chrome 50
This commit is contained in:
		
					parent
					
						
							
								08779eb6d9
							
						
					
				
			
			
				commit
				
					
						f1142cf2b5
					
				
			
		
					 1 changed files with 0 additions and 17 deletions
				
			
		|  | @ -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 { | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Cheng Zhao
				Cheng Zhao