mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 03:56:43 +00:00
Codechange: use size_t for glyph/run counts, remove unneeded glyph count instance variable
This commit is contained in:
+2
-2
@@ -592,7 +592,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||
int dpi_right = dpi->left + dpi->width - 1;
|
||||
TextColour last_colour = initial_colour;
|
||||
|
||||
for (int run_index = 0; run_index < line.CountRuns(); run_index++) {
|
||||
for (size_t run_index = 0; run_index < line.CountRuns(); run_index++) {
|
||||
const ParagraphLayouter::VisualRun &run = line.GetVisualRun(run_index);
|
||||
const auto &glyphs = run.GetGlyphs();
|
||||
const auto &positions = run.GetPositions();
|
||||
@@ -607,7 +607,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||
if (do_shadow && (!fc->GetDrawGlyphShadow() || !colour_has_shadow)) continue;
|
||||
SetColourRemap(do_shadow ? TC_BLACK : colour);
|
||||
|
||||
for (int i = 0; i < run.GetGlyphCount(); i++) {
|
||||
for (size_t i = 0; i < run.GetGlyphCount(); i++) {
|
||||
GlyphID glyph = glyphs[i];
|
||||
|
||||
/* Not a valid glyph (empty) */
|
||||
|
||||
Reference in New Issue
Block a user