mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06: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:
@ -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";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user