diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-09-04 14:26:28 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-04 16:13:30 +0200 |
commit | 1a19d2c2df7e1f48bc3e6e2c63551f54279790d5 (patch) | |
tree | 6adcfad9d9a0408a6e7b44c94253b0f5014b792f /Userland | |
parent | 72b21343ad9cfb2f55c7ea533fb3f3ef6d0adbec (diff) | |
download | serenity-1a19d2c2df7e1f48bc3e6e2c63551f54279790d5.zip |
LibGfx: Stop using a Utf8View that points to a temporary String
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGfx/Painter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index 039553331c..69b19edcae 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -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) |