mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:27:35 +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
|
@ -63,7 +63,7 @@ public:
|
|||
continue;
|
||||
Cursor cursor;
|
||||
cursor.path = move(path);
|
||||
cursor.bitmap = Gfx::Bitmap::load_from_file(cursor.path);
|
||||
cursor.bitmap = Gfx::Bitmap::try_load_from_file(cursor.path);
|
||||
auto filename_split = cursor.path.split('/');
|
||||
cursor.name = filename_split[2];
|
||||
m_cursors.append(move(cursor));
|
||||
|
@ -142,7 +142,7 @@ public:
|
|||
if (!path.contains("filetype-") && !path.contains("app-"))
|
||||
continue;
|
||||
IconSet icon_set;
|
||||
icon_set.big_icon = Gfx::Bitmap::load_from_file(path);
|
||||
icon_set.big_icon = Gfx::Bitmap::try_load_from_file(path);
|
||||
auto filename_split = path.split('/');
|
||||
icon_set.name = filename_split[3];
|
||||
m_icon_sets.append(move(icon_set));
|
||||
|
@ -157,7 +157,7 @@ public:
|
|||
if (!path.contains("filetype-") && !path.contains("app-"))
|
||||
continue;
|
||||
IconSet icon_set;
|
||||
icon_set.little_icon = Gfx::Bitmap::load_from_file(path);
|
||||
icon_set.little_icon = Gfx::Bitmap::try_load_from_file(path);
|
||||
auto filename_split = path.split('/');
|
||||
icon_set.name = filename_split[3];
|
||||
for (size_t i = 0; i < big_icons_found; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue