mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	BitField: Add an explicit Assign method.
This is useful when doing crazy stuff like inheriting from BitField.
This commit is contained in:
		
							parent
							
								
									8cd0d9c000
								
							
						
					
					
						commit
						95be6a09b2
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -142,7 +142,7 @@ public: | |||
| 
 | ||||
|     __forceinline BitField& operator=(T val) | ||||
|     { | ||||
|         storage = (storage & ~GetMask()) | (((StorageType)val << position) & GetMask()); | ||||
|         Assign(val); | ||||
|         return *this; | ||||
|     } | ||||
| 
 | ||||
|  | @ -151,6 +151,10 @@ public: | |||
|         return Value(); | ||||
|     } | ||||
| 
 | ||||
|     __forceinline void Assign(const T& value) { | ||||
|         storage = (storage & ~GetMask()) | (((StorageType)value << position) & GetMask()); | ||||
|     } | ||||
| 
 | ||||
|     __forceinline T Value() const | ||||
|     { | ||||
|         if (std::numeric_limits<T>::is_signed) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue