mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 00:19:27 +00:00
LibGfx: Stop using a Utf8View that points to a temporary String
This commit is contained in:
parent
72b21343ad
commit
1a19d2c2df
|
@ -1492,7 +1492,7 @@ void Painter::do_draw_text(IntRect const& rect, Utf8View const& text, Font const
|
|||
// compatible with draw_text_line.
|
||||
StringBuilder builder;
|
||||
builder.append(directional_run.text());
|
||||
auto line_text = Utf8View { builder.to_string() };
|
||||
auto line_text = Utf8View { builder.string_view() };
|
||||
|
||||
draw_text_line(run_rect, line_text, font, alignment, directional_run.direction(), draw_glyph);
|
||||
if (line_direction == TextDirection::LTR)
|
||||
|
|
Loading…
Reference in a new issue