Explorar o código

LibELF: Use StringView literal syntax to build section names.

Brian Gianforcaro %!s(int64=4) %!d(string=hai) anos
pai
achega
141e6724d1
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  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);
     }