From 7bd409dbdf0c60365da0efa642924c85e3051efe Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Tue, 15 Feb 2022 21:14:15 +0200 Subject: [PATCH] LibELF: Use StringBuilder::string_view() to avoid String allocation --- Userland/Libraries/LibELF/Image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibELF/Image.cpp b/Userland/Libraries/LibELF/Image.cpp index ac865222bb..53ea48a304 100644 --- a/Userland/Libraries/LibELF/Image.cpp +++ b/Userland/Libraries/LibELF/Image.cpp @@ -251,7 +251,7 @@ Optional Image::Section::relocations() const builder.append(".rel"sv); builder.append(name()); - auto relocation_section = m_image.lookup_section(builder.to_string()); + auto relocation_section = m_image.lookup_section(builder.string_view()); if (!relocation_section.has_value()) return {};