summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/arm/disassembler/arm_disasm.cpp18
-rw-r--r--src/core/file_sys/archive_backend.cpp8
-rw-r--r--src/core/file_sys/archive_backend.h8
-rw-r--r--src/core/loader/elf.cpp6
4 files changed, 20 insertions, 20 deletions
diff --git a/src/core/arm/disassembler/arm_disasm.cpp b/src/core/arm/disassembler/arm_disasm.cpp
index 76408e9fa..5ad1f1c29 100644
--- a/src/core/arm/disassembler/arm_disasm.cpp
+++ b/src/core/arm/disassembler/arm_disasm.cpp
@@ -738,23 +738,23 @@ std::string ARM_Disasm::DisassembleMemHalf(u32 insn)
if (is_immed) {
if (is_pre) {
if (offset == 0) {
- return Common::StringFromFormat("%s%sh\tr%d, [r%d]", opname, cond_to_str(cond), rd, rn);
+ return Common::StringFromFormat("%s%s%s\tr%d, [r%d]", opname, cond_to_str(cond), width, rd, rn);
} else {
- return Common::StringFromFormat("%s%sh\tr%d, [r%d, #%s%u]%s",
- opname, cond_to_str(cond), rd, rn, minus, offset, bang);
+ return Common::StringFromFormat("%s%s%s\tr%d, [r%d, #%s%u]%s",
+ opname, cond_to_str(cond), width, rd, rn, minus, offset, bang);
}
} else {
- return Common::StringFromFormat("%s%sh\tr%d, [r%d], #%s%u",
- opname, cond_to_str(cond), rd, rn, minus, offset);
+ return Common::StringFromFormat("%s%s%s\tr%d, [r%d], #%s%u",
+ opname, cond_to_str(cond), width, rd, rn, minus, offset);
}
}
if (is_pre) {
- return Common::StringFromFormat("%s%sh\tr%d, [r%d, %sr%d]%s",
- opname, cond_to_str(cond), rd, rn, minus, rm, bang);
+ return Common::StringFromFormat("%s%s%s\tr%d, [r%d, %sr%d]%s",
+ opname, cond_to_str(cond), width, rd, rn, minus, rm, bang);
} else {
- return Common::StringFromFormat("%s%sh\tr%d, [r%d], %sr%d",
- opname, cond_to_str(cond), rd, rn, minus, rm);
+ return Common::StringFromFormat("%s%s%s\tr%d, [r%d], %sr%d",
+ opname, cond_to_str(cond), width, rd, rn, minus, rm);
}
}
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) {
}
}
-const std::string Path::DebugStr() const {
+std::string Path::DebugStr() const {
switch (GetType()) {
case Invalid:
default:
@@ -66,7 +66,7 @@ const std::string Path::DebugStr() const {
}
}
-const std::string Path::AsString() const {
+std::string Path::AsString() const {
switch (GetType()) {
case Char:
return string;
@@ -83,7 +83,7 @@ const std::string Path::AsString() const {
}
}
-const std::u16string Path::AsU16Str() const {
+std::u16string Path::AsU16Str() const {
switch (GetType()) {
case Char:
return Common::UTF8ToUTF16(string);
@@ -99,7 +99,7 @@ const std::u16string Path::AsU16Str() const {
}
}
-const std::vector<u8> Path::AsBinary() const {
+std::vector<u8> Path::AsBinary() const {
switch (GetType()) {
case Binary:
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:
* Gets the string representation of the path for debugging
* @return String representation of the path for debugging
*/
- const std::string DebugStr() const;
+ std::string DebugStr() const;
- const std::string AsString() const;
- const std::u16string AsU16Str() const;
- const std::vector<u8> AsBinary() const;
+ std::string AsString() const;
+ std::u16string AsU16Str() const;
+ std::vector<u8> AsBinary() const;
private:
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 {
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;