From 19a6846cb6b330e7fec25fff9b4900dc40806843 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Tue, 30 May 2023 21:17:30 +0200 Subject: [PATCH] Codechange: initialize all values of ICURun on construction (#10892) (cherry picked from commit 0302e6f16802cc324d313f3b678a0fe526f9482b) --- src/gfx_layout_icu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gfx_layout_icu.cpp b/src/gfx_layout_icu.cpp index 710dee19d0..0cc24f4efb 100644 --- a/src/gfx_layout_icu.cpp +++ b/src/gfx_layout_icu.cpp @@ -48,7 +48,7 @@ public: std::vector advance; ///< The advance (width) of the glyphs. Valid after Shape() is called. std::vector glyph_to_char; ///< The mapping from glyphs to characters. Valid after Shape() is called. std::vector positions; ///< The positions of the glyphs. Valid after Shape() is called. - int total_advance; ///< The total advance of the run. Valid after Shape() is called. + int total_advance = 0; ///< The total advance of the run. Valid after Shape() is called. ICURun(int start, int length, UBiDiLevel level, UScriptCode script = USCRIPT_UNKNOWN, Font *font = nullptr) : start(start), length(length), level(level), script(script), font(font) {}