mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37: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
|
@ -52,7 +52,7 @@ bool MultiScaleBitmaps::load(StringView const& filename, StringView const& defau
|
|||
m_bitmaps.clear(); // If we're reloading the bitmaps get rid of the old ones
|
||||
|
||||
auto add_bitmap = [&](StringView const& path, int scale_factor) {
|
||||
auto bitmap = Gfx::Bitmap::load_from_file(path, scale_factor);
|
||||
auto bitmap = Gfx::Bitmap::try_load_from_file(path, scale_factor);
|
||||
if (bitmap) {
|
||||
auto bitmap_format = bitmap->format();
|
||||
if (m_format == Gfx::BitmapFormat::Invalid || m_format == bitmap_format) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue