mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 03:26:39 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			No EOL
		
	
	
		
			309 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			No EOL
		
	
	
		
			309 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef MISC_HASH_H
 | 
						|
#define MISC_HASH_H
 | 
						|
 | 
						|
namespace Misc
 | 
						|
{
 | 
						|
    /// Implemented similar to the boost::hash_combine
 | 
						|
    template <class T>
 | 
						|
    inline void hashCombine(std::size_t& seed, const T& v)
 | 
						|
    {
 | 
						|
        std::hash<T> hasher;
 | 
						|
        seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
#endif |