mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibGfx: Use "try_" prefix for static factory functions
Also mark them as [[nodiscard]].
This commit is contained in:
parent
f0409081f5
commit
c7d891765c
131 changed files with 422 additions and 421 deletions
|
@ -33,7 +33,7 @@ DragOperation::Outcome DragOperation::exec()
|
|||
Gfx::ShareableBitmap drag_bitmap;
|
||||
if (m_mime_data->has_format("image/x-raw-bitmap")) {
|
||||
auto data = m_mime_data->data("image/x-raw-bitmap");
|
||||
auto bitmap = Gfx::Bitmap::create_from_serialized_byte_buffer(move(data));
|
||||
auto bitmap = Gfx::Bitmap::try_create_from_serialized_byte_buffer(move(data));
|
||||
drag_bitmap = bitmap->to_shareable_bitmap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue