瀏覽代碼

kernel/thread: Make bracing consistent within UpdatePriority()

Lioncash 7 年之前
父節點
當前提交
e0d1f11968
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/core/hle/kernel/thread.cpp

+ 4 - 2
src/core/hle/kernel/thread.cpp

@@ -306,12 +306,14 @@ void Thread::UpdatePriority() {
     // Find the highest priority among all the threads that are waiting for this thread's lock
     // Find the highest priority among all the threads that are waiting for this thread's lock
     u32 new_priority = nominal_priority;
     u32 new_priority = nominal_priority;
     if (!wait_mutex_threads.empty()) {
     if (!wait_mutex_threads.empty()) {
-        if (wait_mutex_threads.front()->current_priority < new_priority)
+        if (wait_mutex_threads.front()->current_priority < new_priority) {
             new_priority = wait_mutex_threads.front()->current_priority;
             new_priority = wait_mutex_threads.front()->current_priority;
+        }
     }
     }
 
 
-    if (new_priority == current_priority)
+    if (new_priority == current_priority) {
         return;
         return;
+    }
 
 
     scheduler->SetThreadPriority(this, new_priority);
     scheduler->SetThreadPriority(this, new_priority);
     current_priority = new_priority;
     current_priority = new_priority;