Skip to content

Commit 404761c

Browse files
committed
Use C++ casts instead of raw C ones in hdr()
1 parent 09673eb commit 404761c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/patchelf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ class ElfFile
165165
}
166166

167167
[[nodiscard]] Elf_Ehdr *hdr() noexcept {
168-
return (Elf_Ehdr *)fileContents->data();
168+
return reinterpret_cast<Elf_Ehdr *>(fileContents->data());
169169
}
170170

171171
[[nodiscard]] const Elf_Ehdr *hdr() const noexcept {
172-
return (const Elf_Ehdr *)fileContents->data();
172+
return reinterpret_cast<const Elf_Ehdr *>(fileContents->data());
173173
}
174174
};

0 commit comments

Comments
 (0)