mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-02-16 16:00:29 -05:00
Fix various -Wshadow warnings
This commit is contained in:
@@ -172,14 +172,13 @@ Common::Debug::Threads PPCDebugInterface::GetThreads() const
|
||||
constexpr u32 ACTIVE_QUEUE_HEAD_ADDR = 0x800000dc;
|
||||
if (!PowerPC::HostIsRAMAddress(ACTIVE_QUEUE_HEAD_ADDR))
|
||||
return threads;
|
||||
u32 addr = PowerPC::HostRead_U32(ACTIVE_QUEUE_HEAD_ADDR);
|
||||
if (!PowerPC::HostIsRAMAddress(addr))
|
||||
const u32 active_queue_head = PowerPC::HostRead_U32(ACTIVE_QUEUE_HEAD_ADDR);
|
||||
if (!PowerPC::HostIsRAMAddress(active_queue_head))
|
||||
return threads;
|
||||
|
||||
auto active_thread = std::make_unique<Common::Debug::OSThreadView>(addr);
|
||||
auto active_thread = std::make_unique<Common::Debug::OSThreadView>(active_queue_head);
|
||||
if (!active_thread->IsValid())
|
||||
return threads;
|
||||
addr = active_thread->Data().thread_link.prev;
|
||||
|
||||
const auto insert_threads = [&threads](u32 addr, auto get_next_addr) {
|
||||
while (addr != 0 && PowerPC::HostIsRAMAddress(addr))
|
||||
@@ -192,11 +191,13 @@ Common::Debug::Threads PPCDebugInterface::GetThreads() const
|
||||
}
|
||||
};
|
||||
|
||||
insert_threads(addr, [](const auto& thread) { return thread.Data().thread_link.prev; });
|
||||
const u32 prev_addr = active_thread->Data().thread_link.prev;
|
||||
insert_threads(prev_addr, [](const auto& thread) { return thread.Data().thread_link.prev; });
|
||||
std::reverse(threads.begin(), threads.end());
|
||||
addr = active_thread->Data().thread_link.next;
|
||||
|
||||
const u32 next_addr = active_thread->Data().thread_link.next;
|
||||
threads.emplace_back(std::move(active_thread));
|
||||
insert_threads(addr, [](const auto& thread) { return thread.Data().thread_link.next; });
|
||||
insert_threads(next_addr, [](const auto& thread) { return thread.Data().thread_link.next; });
|
||||
|
||||
return threads;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user