Explorar o código

LibGfx: Mark Typeface::get_font() const, because it is const

Sam Atkins %!s(int64=4) %!d(string=hai) anos
pai
achega
c990340c5a

+ 1 - 1
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)

+ 1 - 1
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;