Просмотр исходного кода

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

Idan Horowitz 3 лет назад
Родитель
Сommit
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 {};