浏览代码

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

Idan Horowitz 3 年之前
父节点
当前提交
7bd409dbdf
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 {};