1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:37:35 +00:00

More moving towards using signed types.

I'm still feeling this out, but I am starting to like the general idea.
This commit is contained in:
Andreas Kling 2019-02-25 22:06:55 +01:00
parent beda478821
commit 9624b54703
48 changed files with 234 additions and 250 deletions

View file

@ -20,9 +20,9 @@ void DisjointRectSet::shatter()
do {
pass_had_intersections = false;
output.clear_with_capacity();
for (size_t i = 0; i < m_rects.size(); ++i) {
for (int i = 0; i < m_rects.size(); ++i) {
auto& r1 = m_rects[i];
for (size_t j = 0; j < m_rects.size(); ++j) {
for (int j = 0; j < m_rects.size(); ++j) {
if (i == j)
continue;
auto& r2 = m_rects[j];

View file

@ -120,7 +120,7 @@ bool Font::write_to_file(const String& path)
header.glyph_width = m_glyph_width;
header.glyph_height = m_glyph_height;
header.type = 0;
memcpy(header.name, m_name.characters(), min(m_name.length(), (size_t)63));
memcpy(header.name, m_name.characters(), min(m_name.length(), 63));
size_t bytes_per_glyph = sizeof(unsigned) * m_glyph_height;

View file

@ -336,7 +336,7 @@ void Painter::draw_text(const Rect& rect, const String& text, TextAlignment alig
ASSERT_NOT_REACHED();
}
for (unsigned i = 0; i < text.length(); ++i, point.move_by(font().glyph_width(), 0)) {
for (ssize_t i = 0; i < text.length(); ++i, point.move_by(font().glyph_width(), 0)) {
byte ch = text[i];
if (ch == ' ')
continue;