diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/file_sys/archive_backend.cpp | 8 | ||||
| -rw-r--r-- | src/core/file_sys/archive_backend.h | 8 | ||||
| -rw-r--r-- | src/core/loader/elf.cpp | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/core/file_sys/archive_backend.cpp b/src/core/file_sys/archive_backend.cpp index 3f81447df..97adf0e12 100644 --- a/src/core/file_sys/archive_backend.cpp +++ b/src/core/file_sys/archive_backend.cpp | |||
| @@ -43,7 +43,7 @@ Path::Path(LowPathType type, u32 size, u32 pointer) : type(type) { | |||
| 43 | } | 43 | } |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | const std::string Path::DebugStr() const { | 46 | std::string Path::DebugStr() const { |
| 47 | switch (GetType()) { | 47 | switch (GetType()) { |
| 48 | case Invalid: | 48 | case Invalid: |
| 49 | default: | 49 | default: |
| @@ -66,7 +66,7 @@ const std::string Path::DebugStr() const { | |||
| 66 | } | 66 | } |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | const std::string Path::AsString() const { | 69 | std::string Path::AsString() const { |
| 70 | switch (GetType()) { | 70 | switch (GetType()) { |
| 71 | case Char: | 71 | case Char: |
| 72 | return string; | 72 | return string; |
| @@ -83,7 +83,7 @@ const std::string Path::AsString() const { | |||
| 83 | } | 83 | } |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | const std::u16string Path::AsU16Str() const { | 86 | std::u16string Path::AsU16Str() const { |
| 87 | switch (GetType()) { | 87 | switch (GetType()) { |
| 88 | case Char: | 88 | case Char: |
| 89 | return Common::UTF8ToUTF16(string); | 89 | return Common::UTF8ToUTF16(string); |
| @@ -99,7 +99,7 @@ const std::u16string Path::AsU16Str() const { | |||
| 99 | } | 99 | } |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | const std::vector<u8> Path::AsBinary() const { | 102 | std::vector<u8> Path::AsBinary() const { |
| 103 | switch (GetType()) { | 103 | switch (GetType()) { |
| 104 | case Binary: | 104 | case Binary: |
| 105 | return binary; | 105 | return binary; |
diff --git a/src/core/file_sys/archive_backend.h b/src/core/file_sys/archive_backend.h index e7a59a1ed..601e95d8c 100644 --- a/src/core/file_sys/archive_backend.h +++ b/src/core/file_sys/archive_backend.h | |||
| @@ -49,11 +49,11 @@ public: | |||
| 49 | * Gets the string representation of the path for debugging | 49 | * Gets the string representation of the path for debugging |
| 50 | * @return String representation of the path for debugging | 50 | * @return String representation of the path for debugging |
| 51 | */ | 51 | */ |
| 52 | const std::string DebugStr() const; | 52 | std::string DebugStr() const; |
| 53 | 53 | ||
| 54 | const std::string AsString() const; | 54 | std::string AsString() const; |
| 55 | const std::u16string AsU16Str() const; | 55 | std::u16string AsU16Str() const; |
| 56 | const std::vector<u8> AsBinary() const; | 56 | std::vector<u8> AsBinary() const; |
| 57 | 57 | ||
| 58 | private: | 58 | private: |
| 59 | LowPathType type; | 59 | LowPathType type; |
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 { | |||
| 250 | return nullptr; | 250 | return nullptr; |
| 251 | 251 | ||
| 252 | int name_offset = sections[section].sh_name; | 252 | int name_offset = sections[section].sh_name; |
| 253 | const char* ptr = (char*)GetSectionDataPtr(header->e_shstrndx); | 253 | const char* ptr = reinterpret_cast<const char*>(GetSectionDataPtr(header->e_shstrndx)); |
| 254 | 254 | ||
| 255 | if (ptr) | 255 | if (ptr) |
| 256 | return ptr + name_offset; | 256 | return ptr + name_offset; |
| @@ -347,10 +347,10 @@ bool ElfReader::LoadSymbols() { | |||
| 347 | SectionID sec = GetSectionByName(".symtab"); | 347 | SectionID sec = GetSectionByName(".symtab"); |
| 348 | if (sec != -1) { | 348 | if (sec != -1) { |
| 349 | int stringSection = sections[sec].sh_link; | 349 | int stringSection = sections[sec].sh_link; |
| 350 | const char *stringBase = (const char *)GetSectionDataPtr(stringSection); | 350 | const char *stringBase = reinterpret_cast<const char*>(GetSectionDataPtr(stringSection)); |
| 351 | 351 | ||
| 352 | //We have a symbol table! | 352 | //We have a symbol table! |
| 353 | Elf32_Sym* symtab = (Elf32_Sym *)(GetSectionDataPtr(sec)); | 353 | const Elf32_Sym* symtab = reinterpret_cast<const Elf32_Sym*>(GetSectionDataPtr(sec)); |
| 354 | unsigned int numSymbols = sections[sec].sh_size / sizeof(Elf32_Sym); | 354 | unsigned int numSymbols = sections[sec].sh_size / sizeof(Elf32_Sym); |
| 355 | for (unsigned sym = 0; sym < numSymbols; sym++) { | 355 | for (unsigned sym = 0; sym < numSymbols; sym++) { |
| 356 | int size = symtab[sym].st_size; | 356 | int size = symtab[sym].st_size; |