浏览代码

LibELF: Use StringView literal syntax to build section names.

Brian Gianforcaro 4 年之前
父节点
当前提交
141e6724d1
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      Userland/Libraries/LibELF/DynamicObject.h

+ 2 - 3
Userland/Libraries/LibELF/DynamicObject.h

@@ -219,9 +219,8 @@ public:
 
     HashSection hash_section() const
     {
-        auto section_name = m_hash_type == HashType::SYSV
-            ? StringView { "DT_HASH", 7 }
-            : StringView { "DT_GNU_HASH", 11 };
+        auto section_name = m_hash_type == HashType::SYSV ? "DT_HASH"sv : "DT_GNU_HASH"sv;
+
         return HashSection(Section(*this, m_hash_table_offset, 0, 0, section_name), m_hash_type);
     }