diff options
author | Sam Atkins <atkinssj@gmail.com> | 2021-08-12 16:26:58 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-18 10:32:32 +0200 |
commit | c990340c5a69834b0dc6ebc06269cf5f56b2ec11 (patch) | |
tree | 6e9672c7c3ca4f071bde1dc91b569401aea772dc /Userland | |
parent | 7106655c86f01269d7f7d56789ac996e74e468e2 (diff) | |
download | serenity-c990340c5a69834b0dc6ebc06269cf5f56b2ec11.zip |
LibGfx: Mark Typeface::get_font() const, because it is const
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGfx/Typeface.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibGfx/Typeface.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGfx/Typeface.cpp b/Userland/Libraries/LibGfx/Typeface.cpp index 0a2fa337de..17fd08b266 100644 --- a/Userland/Libraries/LibGfx/Typeface.cpp +++ b/Userland/Libraries/LibGfx/Typeface.cpp @@ -38,7 +38,7 @@ void Typeface::set_ttf_font(RefPtr<TTF::Font> font) m_ttf_font = font; } -RefPtr<Font> Typeface::get_font(unsigned size) +RefPtr<Font> Typeface::get_font(unsigned size) const { for (auto font : m_bitmap_fonts) { if (font->presentation_size() == size) diff --git a/Userland/Libraries/LibGfx/Typeface.h b/Userland/Libraries/LibGfx/Typeface.h index ae3a235b81..818cb5a760 100644 --- a/Userland/Libraries/LibGfx/Typeface.h +++ b/Userland/Libraries/LibGfx/Typeface.h @@ -35,7 +35,7 @@ public: void add_bitmap_font(RefPtr<BitmapFont>); void set_ttf_font(RefPtr<TTF::Font>); - RefPtr<Font> get_font(unsigned size); + RefPtr<Font> get_font(unsigned size) const; private: String m_family; |