mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:42:43 +00:00 
			
		
		
		
	LibGUI: Run clang-format on everything.
This commit is contained in:
		
							parent
							
								
									bc951ca565
								
							
						
					
					
						commit
						7ad8790d80
					
				
					 43 changed files with 525 additions and 363 deletions
				
			
		|  | @ -1,7 +1,7 @@ | |||
| #include <LibC/SharedBuffer.h> | ||||
| #include <LibGUI/GClipboard.h> | ||||
| #include <LibGUI/GEventLoop.h> | ||||
| #include <WindowServer/WSAPITypes.h> | ||||
| #include <LibC/SharedBuffer.h> | ||||
| 
 | ||||
| GClipboard& GClipboard::the() | ||||
| { | ||||
|  | @ -21,15 +21,15 @@ String GClipboard::data() const | |||
|     request.type = WSAPI_ClientMessage::Type::GetClipboardContents; | ||||
|     auto response = GEventLoop::current().sync_request(request, WSAPI_ServerMessage::Type::DidGetClipboardContents); | ||||
|     if (response.clipboard.shared_buffer_id < 0) | ||||
|         return { }; | ||||
|         return {}; | ||||
|     auto shared_buffer = SharedBuffer::create_from_shared_buffer_id(response.clipboard.shared_buffer_id); | ||||
|     if (!shared_buffer) { | ||||
|         dbgprintf("GClipboard::data() failed to attach to the shared buffer\n"); | ||||
|         return { }; | ||||
|         return {}; | ||||
|     } | ||||
|     if (response.clipboard.contents_size > shared_buffer->size()) { | ||||
|         dbgprintf("GClipboard::data() clipping contents size is greater than shared buffer size\n"); | ||||
|         return { }; | ||||
|         return {}; | ||||
|     } | ||||
|     return String((const char*)shared_buffer->data(), response.clipboard.contents_size); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling