summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-04-18 22:11:41 +0300
committerAndreas Kling <kling@serenityos.org>2021-04-18 22:10:25 +0200
commit3c894d1e6faa9b0d5eb762ec3944bf6577e301ff (patch)
treed4933945da75114489c0840f4a81480256716afc /Userland
parentc1971df4c7d810cf22300036d451690957e2ea4a (diff)
downloadserenity-3c894d1e6faa9b0d5eb762ec3944bf6577e301ff.zip
LibGfx: Use size_t instead of int for glyph count
The count is always non-negative
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibGfx/BitmapFont.h2
-rw-r--r--Userland/Libraries/LibGfx/Font.h2
-rw-r--r--Userland/Libraries/LibTTF/Font.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibGfx/BitmapFont.h b/Userland/Libraries/LibGfx/BitmapFont.h
index c62807a4ad..4fab8edc27 100644
--- a/Userland/Libraries/LibGfx/BitmapFont.h
+++ b/Userland/Libraries/LibGfx/BitmapFont.h
@@ -107,7 +107,7 @@ public:
m_glyph_widths[ch] = width;
}
- int glyph_count() const { return m_glyph_count; }
+ size_t glyph_count() const { return m_glyph_count; }
FontTypes type() { return m_type; }
void set_type(FontTypes type);
diff --git a/Userland/Libraries/LibGfx/Font.h b/Userland/Libraries/LibGfx/Font.h
index f074dd1e2e..30b43be563 100644
--- a/Userland/Libraries/LibGfx/Font.h
+++ b/Userland/Libraries/LibGfx/Font.h
@@ -134,7 +134,7 @@ public:
virtual u8 glyph_spacing() const = 0;
- virtual int glyph_count() const = 0;
+ virtual size_t glyph_count() const = 0;
virtual String family() const = 0;
virtual String variant() const = 0;
diff --git a/Userland/Libraries/LibTTF/Font.h b/Userland/Libraries/LibTTF/Font.h
index 21b44da7e8..b23067b2f6 100644
--- a/Userland/Libraries/LibTTF/Font.h
+++ b/Userland/Libraries/LibTTF/Font.h
@@ -156,7 +156,7 @@ public:
virtual String name() const override { return String::formatted("{} {}", family(), variant()); }
virtual bool is_fixed_width() const override { return m_font->is_fixed_width(); }
virtual u8 glyph_spacing() const override { return m_x_scale; } // FIXME: Read from font
- virtual int glyph_count() const override { return m_font->glyph_count(); }
+ virtual size_t glyph_count() const override { return m_font->glyph_count(); }
virtual String family() const override { return m_font->family(); }
virtual String variant() const override { return m_font->variant(); }
virtual String qualified_name() const override { return String::formatted("{} {} {}", family(), presentation_size(), weight()); }