diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-21 18:02:15 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-21 18:02:15 +0200 |
commit | c7d891765cc87ec04f8d332b93fc7c3f82521d7f (patch) | |
tree | 9d414d3ad62e0193b1b6fb0d12079e11e96e69b1 /Userland/Demos/WidgetGallery/GalleryModels.h | |
parent | f0409081f562b635de3a23d7babbc7348cbb970c (diff) | |
download | serenity-c7d891765cc87ec04f8d332b93fc7c3f82521d7f.zip |
LibGfx: Use "try_" prefix for static factory functions
Also mark them as [[nodiscard]].
Diffstat (limited to 'Userland/Demos/WidgetGallery/GalleryModels.h')
-rw-r--r-- | Userland/Demos/WidgetGallery/GalleryModels.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Demos/WidgetGallery/GalleryModels.h b/Userland/Demos/WidgetGallery/GalleryModels.h index f00992f07f..038a26b9cb 100644 --- a/Userland/Demos/WidgetGallery/GalleryModels.h +++ b/Userland/Demos/WidgetGallery/GalleryModels.h @@ -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++) { |