Browse Source

LibELF: Use StringBuilder::string_view() to avoid String allocation

Idan Horowitz 3 years ago
parent
commit
7bd409dbdf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Userland/Libraries/LibELF/Image.cpp

+ 1 - 1
Userland/Libraries/LibELF/Image.cpp

@@ -251,7 +251,7 @@ Optional<Image::RelocationSection> 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 {};