mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Merge pull request #87831 from Riteo/bitfield-xor
Core: Implement a XOR operator for BitField
This commit is contained in:
		
						commit
						9335b83a32
					
				
					 2 changed files with 2 additions and 1 deletions
				
			
		|  | @ -296,6 +296,7 @@ public: | ||||||
| 	_FORCE_INLINE_ constexpr BitField(T p_value) { value = (int64_t)p_value; } | 	_FORCE_INLINE_ constexpr BitField(T p_value) { value = (int64_t)p_value; } | ||||||
| 	_FORCE_INLINE_ operator int64_t() const { return value; } | 	_FORCE_INLINE_ operator int64_t() const { return value; } | ||||||
| 	_FORCE_INLINE_ operator Variant() const { return value; } | 	_FORCE_INLINE_ operator Variant() const { return value; } | ||||||
|  | 	_FORCE_INLINE_ BitField<T> operator^(const BitField<T> &p_b) const { return BitField<T>(value ^ p_b.value); } | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #define TEMPL_MAKE_BITFIELD_TYPE_INFO(m_enum, m_impl)                                                                                            \ | #define TEMPL_MAKE_BITFIELD_TYPE_INFO(m_enum, m_impl)                                                                                            \ | ||||||
|  |  | ||||||
|  | @ -1563,7 +1563,7 @@ void WaylandThread::_wl_pointer_on_frame(void *data, struct wl_pointer *wl_point | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if (old_pd.pressed_button_mask != pd.pressed_button_mask) { | 	if (old_pd.pressed_button_mask != pd.pressed_button_mask) { | ||||||
| 		BitField<MouseButtonMask> pressed_mask_delta = BitField<MouseButtonMask>((uint32_t)old_pd.pressed_button_mask ^ (uint32_t)pd.pressed_button_mask); | 		BitField<MouseButtonMask> pressed_mask_delta = old_pd.pressed_button_mask ^ pd.pressed_button_mask; | ||||||
| 
 | 
 | ||||||
| 		const MouseButton buttons_to_test[] = { | 		const MouseButton buttons_to_test[] = { | ||||||
| 			MouseButton::LEFT, | 			MouseButton::LEFT, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Rémi Verschelde
						Rémi Verschelde