From 83366fa9b8c0abbe889b5d05a9b94aeb0a91dd48 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Sat, 8 Mar 2025 12:18:11 -0500 Subject: [PATCH] Font/Text: remove unused argument Fixup https://github.com/wesnoth/wesnoth/commit/b0fca37cbc14bca8eddfb47220f726e3c367f1fd --- src/font/text.cpp | 4 ++-- src/font/text.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/font/text.cpp b/src/font/text.cpp index 936d42414c3..990904b907f 100644 --- a/src/font/text.cpp +++ b/src/font/text.cpp @@ -709,7 +709,7 @@ static void from_cairo_format(uint32_t & c) c = (static_cast(a) << 24) | (static_cast(r) << 16) | (static_cast(g) << 8) | static_cast(b); } -void pango_text::render(PangoLayout& layout, const SDL_Rect& viewport, const unsigned stride) +void pango_text::render(PangoLayout& layout, const SDL_Rect& viewport) { uint8_t* buffer = &surface_buffer_[0]; @@ -794,7 +794,7 @@ surface pango_text::create_surface(const SDL_Rect& viewport) // Try rendering the whole text in one go. If this throws a length_error // then leave it to the caller to handle; one reason it may throw is that // cairo surfaces are limited to approximately 2**15 pixels in height. - render(*layout_, viewport, stride); + render(*layout_, viewport); // The cairo surface is in CAIRO_FORMAT_ARGB32 which uses // pre-multiplied alpha. SDL doesn't use that so the pixels need to be diff --git a/src/font/text.hpp b/src/font/text.hpp index e6b11cb3259..b04bc11dcec 100644 --- a/src/font/text.hpp +++ b/src/font/text.hpp @@ -454,7 +454,7 @@ private: * This is part of create_surface(viewport). The separation is a legacy * from workarounds to the size limits of cairo_surface_t. */ - void render(PangoLayout& layout, const SDL_Rect& viewport, const unsigned stride); + void render(PangoLayout& layout, const SDL_Rect& viewport); /** * Buffer to store the image on.