mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
AK: Use size_t for the length of strings
Using int was a mistake. This patch changes String, StringImpl, StringView and StringBuilder to use size_t instead of int for lengths. Obviously a lot of code needs to change as a result of this.
This commit is contained in:
parent
1726c17d0d
commit
6f4c380d95
54 changed files with 387 additions and 377 deletions
|
@ -154,7 +154,7 @@ bool Font::write_to_file(const StringView& path)
|
|||
header.glyph_height = m_glyph_height;
|
||||
header.type = 0;
|
||||
header.is_variable_width = !m_fixed_width;
|
||||
memcpy(header.name, m_name.characters(), min(m_name.length(), 63));
|
||||
memcpy(header.name, m_name.characters(), min(m_name.length(), (size_t)63));
|
||||
|
||||
size_t bytes_per_glyph = sizeof(unsigned) * m_glyph_height;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue