mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:02:46 +00:00 
			
		
		
		
	Kernel: Remove superfluous alignas(T) from KResultOr<T>
				
					
				
			Since `m_storage` is already guaranteed to be correctly aligned for the type, we can forgo specifying it for the entire class. This fixes an error: previously, this would *force* the value type's alignment on the entire class, which would try to make 1-byte aligned ints with `KResultOr<bool>`. GCC somehow compiled this (probably just ignored it), but this caused a build error with Clang. Closes #8072
This commit is contained in:
		
							parent
							
								
									2d2747cb15
								
							
						
					
					
						commit
						ffb118265b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -43,7 +43,7 @@ private: | |||
| }; | ||||
| 
 | ||||
| template<typename T> | ||||
| class alignas(T) [[nodiscard]] KResultOr { | ||||
| class [[nodiscard]] KResultOr { | ||||
| public: | ||||
|     KResultOr(KResult error) | ||||
|         : m_error(error) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Daniel Bertalan
						Daniel Bertalan