Przeglądaj źródła

LibELF: Use StringView literal syntax to build section names.

Brian Gianforcaro 4 lat temu
rodzic
commit
141e6724d1
1 zmienionych plików z 2 dodań i 3 usunięć
  1. 2 3
      Userland/Libraries/LibELF/DynamicObject.h

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

@@ -219,9 +219,8 @@ public:
 
 
     HashSection hash_section() const
     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);
         return HashSection(Section(*this, m_hash_table_offset, 0, 0, section_name), m_hash_type);
     }
     }