Changeset - r28038:cee5bc8943d9
[Not reviewed]
master
0 1 0
Peter Nelson - 8 months ago 2023-10-25 13:08:07
peter1138@openttd.org
Cleanup: No need to cast `const Font *` to itself. (#11395)
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/gfx.cpp
Show inline comments
 
@@ -521,7 +521,7 @@ static int DrawLayoutLine(const Paragrap
 
		 * another size would be chosen it won't have truncated too little for
 
		 * the truncation dots.
 
		 */
 
		FontCache *fc = ((const Font*)line.GetVisualRun(0).GetFont())->fc;
 
		FontCache *fc = line.GetVisualRun(0).GetFont()->fc;
 
		GlyphID dot_glyph = fc->MapCharToGlyph('.');
 
		dot_width = fc->GetGlyphWidth(dot_glyph);
 
		dot_sprite = fc->GetGlyph(dot_glyph);
 
@@ -570,7 +570,7 @@ static int DrawLayoutLine(const Paragrap
 
	bool draw_shadow = false;
 
	for (int run_index = 0; run_index < line.CountRuns(); run_index++) {
 
		const ParagraphLayouter::VisualRun &run = line.GetVisualRun(run_index);
 
		const Font *f = (const Font*)run.GetFont();
 
		const Font *f = run.GetFont();
 

	
 
		FontCache *fc = f->fc;
 
		colour = f->colour;
0 comments (0 inline, 0 general)