summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-09-04 14:26:28 +0300
committerAndreas Kling <kling@serenityos.org>2021-09-04 16:13:30 +0200
commit1a19d2c2df7e1f48bc3e6e2c63551f54279790d5 (patch)
tree6adcfad9d9a0408a6e7b44c94253b0f5014b792f /Userland
parent72b21343ad9cfb2f55c7ea533fb3f3ef6d0adbec (diff)
downloadserenity-1a19d2c2df7e1f48bc3e6e2c63551f54279790d5.zip
LibGfx: Stop using a Utf8View that points to a temporary String
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibGfx/Painter.cpp2
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)