mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-03 17:58:34 +00:00
CodeWidget/CodeViewWidget: Make symbol pointers const where applicable
These aren't used to modify the data they point to, so make that explicit. Also while we're at it, add const to any nearby variables that can be made so.
This commit is contained in:
parent
f568e41fac
commit
880f7871d9
3 changed files with 16 additions and 16 deletions
|
@ -280,17 +280,17 @@ void CodeViewWidget::OnCopyFunction()
|
|||
{
|
||||
const u32 address = GetContextAddress();
|
||||
|
||||
Symbol* symbol = g_symbolDB.GetSymbolFromAddr(address);
|
||||
const Symbol* symbol = g_symbolDB.GetSymbolFromAddr(address);
|
||||
if (!symbol)
|
||||
return;
|
||||
|
||||
std::string text = symbol->name + "\r\n";
|
||||
// we got a function
|
||||
u32 start = symbol->address;
|
||||
u32 end = start + symbol->size;
|
||||
const u32 start = symbol->address;
|
||||
const u32 end = start + symbol->size;
|
||||
for (u32 addr = start; addr != end; addr += 4)
|
||||
{
|
||||
std::string disasm = PowerPC::debug_interface.Disassemble(addr);
|
||||
const std::string disasm = PowerPC::debug_interface.Disassemble(addr);
|
||||
text += StringFromFormat("%08x: ", addr) + disasm + "\r\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue