mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	hashlib: Add a hash for bool.
This commit is contained in:
		
							parent
							
								
									5488c69d2a
								
							
						
					
					
						commit
						dbfd0b61e3
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -66,6 +66,12 @@ struct hash_int_ops { | |||
| 	} | ||||
| }; | ||||
| 
 | ||||
| template<> struct hash_ops<bool> : hash_int_ops | ||||
| { | ||||
| 	static inline unsigned int hash(bool a) { | ||||
| 		return a ? 1 : 0; | ||||
| 	} | ||||
| }; | ||||
| template<> struct hash_ops<int32_t> : hash_int_ops | ||||
| { | ||||
| 	static inline unsigned int hash(int32_t a) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue