mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +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
|
@ -50,7 +50,7 @@ RefPtr<ProjectTemplate> ProjectTemplate::load_from_manifest(const String& manife
|
|||
auto bitmap_path_32 = String::formatted("/res/icons/hackstudio/templates-32x32/{}.png", config->read_entry("HackStudioTemplate", "IconName32x"));
|
||||
|
||||
if (Core::File::exists(bitmap_path_32)) {
|
||||
auto bitmap32 = Gfx::Bitmap::load_from_file(bitmap_path_32);
|
||||
auto bitmap32 = Gfx::Bitmap::try_load_from_file(bitmap_path_32);
|
||||
icon = GUI::Icon(move(bitmap32));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue