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/Applications/3DFileViewer/main.cpp | |
parent | f0409081f562b635de3a23d7babbc7348cbb970c (diff) | |
download | serenity-c7d891765cc87ec04f8d332b93fc7c3f82521d7f.zip |
LibGfx: Use "try_" prefix for static factory functions
Also mark them as [[nodiscard]].
Diffstat (limited to 'Userland/Applications/3DFileViewer/main.cpp')
-rw-r--r-- | Userland/Applications/3DFileViewer/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/3DFileViewer/main.cpp b/Userland/Applications/3DFileViewer/main.cpp index 95b3f1a7e0..27a1fe34bb 100644 --- a/Userland/Applications/3DFileViewer/main.cpp +++ b/Userland/Applications/3DFileViewer/main.cpp @@ -42,7 +42,7 @@ private: GLContextWidget() : m_mesh_loader(adopt_own(*new WavefrontOBJLoader())) { - m_bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRx8888, { RENDER_WIDTH, RENDER_HEIGHT }); + m_bitmap = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRx8888, { RENDER_WIDTH, RENDER_HEIGHT }); m_context = GL::create_context(*m_bitmap); start_timer(20); @@ -169,7 +169,7 @@ bool GLContextWidget::load(const String& filename) builder.append(".bmp"); // Attempt to open the texture file from disk - auto texture_image = Gfx::Bitmap::load_from_file(builder.string_view()); + auto texture_image = Gfx::Bitmap::try_load_from_file(builder.string_view()); GLuint tex; glGenTextures(1, &tex); |