Просмотр исходного кода

cpu_manager: Remove redundant std::function declarations

We can just return the function directly. Making for less reading.
Lioncash 6 лет назад
Родитель
Сommit
989ad52dc1
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/core/cpu_manager.cpp

+ 3 - 3
src/core/cpu_manager.cpp

@@ -52,15 +52,15 @@ void CpuManager::Shutdown() {
 }
 
 std::function<void(void*)> CpuManager::GetGuestThreadStartFunc() {
-    return std::function<void(void*)>(GuestThreadFunction);
+    return GuestThreadFunction;
 }
 
 std::function<void(void*)> CpuManager::GetIdleThreadStartFunc() {
-    return std::function<void(void*)>(IdleThreadFunction);
+    return IdleThreadFunction;
 }
 
 std::function<void(void*)> CpuManager::GetSuspendThreadStartFunc() {
-    return std::function<void(void*)>(SuspendThreadFunction);
+    return SuspendThreadFunction;
 }
 
 void CpuManager::GuestThreadFunction(void* cpu_manager_) {