summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-01-25 09:41:32 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2016-01-25 09:41:32 +0100
commit8b3994e9e4629423960f9ba22e5df01afd5b724b (patch)
treeaf24d4a10baa5c0c3eee4e2eefb2b202245c3a5e /src/core
parentMerge pull request #1372 from lioncash/tie (diff)
parentelf: Don't cast away const (diff)
downloadyuzu-8b3994e9e4629423960f9ba22e5df01afd5b724b.tar
yuzu-8b3994e9e4629423960f9ba22e5df01afd5b724b.tar.gz
yuzu-8b3994e9e4629423960f9ba22e5df01afd5b724b.tar.bz2
yuzu-8b3994e9e4629423960f9ba22e5df01afd5b724b.tar.lz
yuzu-8b3994e9e4629423960f9ba22e5df01afd5b724b.tar.xz
yuzu-8b3994e9e4629423960f9ba22e5df01afd5b724b.tar.zst
yuzu-8b3994e9e4629423960f9ba22e5df01afd5b724b.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/loader/elf.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp
index 5d7264f12..69df94324 100644
--- a/src/core/loader/elf.cpp
+++ b/src/core/loader/elf.cpp
@@ -250,7 +250,7 @@ const char *ElfReader::GetSectionName(int section) const {
return nullptr;
int name_offset = sections[section].sh_name;
- const char* ptr = (char*)GetSectionDataPtr(header->e_shstrndx);
+ const char* ptr = reinterpret_cast<const char*>(GetSectionDataPtr(header->e_shstrndx));
if (ptr)
return ptr + name_offset;
@@ -347,10 +347,10 @@ bool ElfReader::LoadSymbols() {
SectionID sec = GetSectionByName(".symtab");
if (sec != -1) {
int stringSection = sections[sec].sh_link;
- const char *stringBase = (const char *)GetSectionDataPtr(stringSection);
+ const char *stringBase = reinterpret_cast<const char*>(GetSectionDataPtr(stringSection));
//We have a symbol table!
- Elf32_Sym* symtab = (Elf32_Sym *)(GetSectionDataPtr(sec));
+ const Elf32_Sym* symtab = reinterpret_cast<const Elf32_Sym*>(GetSectionDataPtr(sec));
unsigned int numSymbols = sections[sec].sh_size / sizeof(Elf32_Sym);
for (unsigned sym = 0; sym < numSymbols; sym++) {
int size = symtab[sym].st_size;