mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-15 23:09:05 +00:00
LibGfx: Stop using a Utf8View that points to a temporary String
This commit is contained in:
parent
72b21343ad
commit
1a19d2c2df
Notes:
sideshowbarker
2024-07-18 04:46:51 +09:00
Author: https://github.com/IdanHo
Commit: 1a19d2c2df
Pull-request: https://github.com/SerenityOS/serenity/pull/9805
Reviewed-by: https://github.com/sin-ack ✅
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue