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/Libraries/LibTTF/Glyf.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/Libraries/LibTTF/Glyf.cpp')
-rw-r--r-- | Userland/Libraries/LibTTF/Glyf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibTTF/Glyf.cpp b/Userland/Libraries/LibTTF/Glyf.cpp index 9ec8e6f586..cfc60eb7f5 100644 --- a/Userland/Libraries/LibTTF/Glyf.cpp +++ b/Userland/Libraries/LibTTF/Glyf.cpp @@ -207,7 +207,7 @@ void Rasterizer::draw_path(Gfx::Path& path) RefPtr<Gfx::Bitmap> Rasterizer::accumulate() { - auto bitmap = Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, m_size); + auto bitmap = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRA8888, m_size); if (!bitmap) return {}; Color base_color = Color::from_rgb(0xffffff); |