mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 13:22:43 +00:00 
			
		
		
		
	Userland: Properly define IPC::encode and IPC::decode specializations
In order to avoid the base encode/decode methods from being used (and failing a static assertion), we must be sure to declare/define the custom type implementations as template specializations. After this, LibIPC is no longer sensitive to include order.
This commit is contained in:
		
							parent
							
								
									b1ea418d14
								
							
						
					
					
						commit
						05f41382bb
					
				
					 25 changed files with 75 additions and 2 deletions
				
			
		|  | @ -27,6 +27,7 @@ Response::Response(Error&& error) | |||
| 
 | ||||
| } | ||||
| 
 | ||||
| template<> | ||||
| bool IPC::encode(Encoder& encoder, Web::WebDriver::Response const& response) | ||||
| { | ||||
|     response.visit( | ||||
|  | @ -46,6 +47,7 @@ bool IPC::encode(Encoder& encoder, Web::WebDriver::Response const& response) | |||
|     return true; | ||||
| } | ||||
| 
 | ||||
| template<> | ||||
| ErrorOr<void> IPC::decode(Decoder& decoder, Web::WebDriver::Response& response) | ||||
| { | ||||
|     ResponseType type {}; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy Flynn
						Timothy Flynn