From 7de79d3bbbde63b121eb60f7a35715ef5b5a5ee7 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Thu, 18 Jul 2019 12:13:57 +0200 Subject: [PATCH] ELFImage: Sprinkle some constification love --- AK/ELF/ELFImage.cpp | 4 ++-- AK/ELF/ELFImage.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AK/ELF/ELFImage.cpp b/AK/ELF/ELFImage.cpp index 5228bf53f81..20952f7eb86 100644 --- a/AK/ELF/ELFImage.cpp +++ b/AK/ELF/ELFImage.cpp @@ -29,7 +29,7 @@ static const char* object_file_type_to_string(Elf32_Half type) } } -const char* ELFImage::section_index_to_string(unsigned index) +const char* ELFImage::section_index_to_string(unsigned index) const { if (index == SHN_UNDEF) return "Undefined"; @@ -43,7 +43,7 @@ unsigned ELFImage::symbol_count() const return section(m_symbol_table_section_index).entry_count(); } -void ELFImage::dump() +void ELFImage::dump() const { kprintf("ELFImage{%p} {\n", this); kprintf(" is_valid: %u\n", is_valid()); diff --git a/AK/ELF/ELFImage.h b/AK/ELF/ELFImage.h index 19238d191d1..c6050bf6a83 100644 --- a/AK/ELF/ELFImage.h +++ b/AK/ELF/ELFImage.h @@ -9,7 +9,7 @@ class ELFImage { public: explicit ELFImage(const u8*); ~ELFImage(); - void dump(); + void dump() const; bool is_valid() const { return m_valid; } bool parse(); @@ -132,7 +132,7 @@ private: const Elf32_Phdr& program_header_internal(unsigned) const; const char* table_string(unsigned offset) const; const char* section_header_table_string(unsigned offset) const; - const char* section_index_to_string(unsigned index); + const char* section_index_to_string(unsigned index) const; const u8* m_buffer { nullptr }; bool m_valid { false };