Merge pull request #11116 from lat9nq/clang-shadowing
general: Silence -Wshadow{,-uncaptured-local} warnings
This commit is contained in:
commit
014ca709c9
21 changed files with 2364 additions and 2250 deletions
|
@ -302,12 +302,12 @@ Result KThread::InitializeServiceThread(Core::System& system, KThread* thread,
|
|||
std::function<void()>&& func, s32 prio, s32 virt_core,
|
||||
KProcess* owner) {
|
||||
system.Kernel().GlobalSchedulerContext().AddThread(thread);
|
||||
std::function<void()> func2{[&system, func{std::move(func)}] {
|
||||
std::function<void()> func2{[&system, func_{std::move(func)}] {
|
||||
// Similar to UserModeThreadStarter.
|
||||
system.Kernel().CurrentScheduler()->OnThreadStart();
|
||||
|
||||
// Run the guest function.
|
||||
func();
|
||||
func_();
|
||||
|
||||
// Exit.
|
||||
Svc::ExitThread(system);
|
||||
|
|
|
@ -1089,15 +1089,15 @@ static std::jthread RunHostThreadFunc(KernelCore& kernel, KProcess* process,
|
|||
KThread::Register(kernel, thread);
|
||||
|
||||
return std::jthread(
|
||||
[&kernel, thread, thread_name{std::move(thread_name)}, func{std::move(func)}] {
|
||||
[&kernel, thread, thread_name_{std::move(thread_name)}, func_{std::move(func)}] {
|
||||
// Set the thread name.
|
||||
Common::SetCurrentThreadName(thread_name.c_str());
|
||||
Common::SetCurrentThreadName(thread_name_.c_str());
|
||||
|
||||
// Set the thread as current.
|
||||
kernel.RegisterHostThread(thread);
|
||||
|
||||
// Run the callback.
|
||||
func();
|
||||
func_();
|
||||
|
||||
// Close the thread.
|
||||
// This will free the process if it is the last reference.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue