diff options
| author | 2014-06-06 00:35:49 -0400 | |
|---|---|---|
| committer | 2014-06-13 09:51:13 -0400 | |
| commit | c95972275e276abe3afcac79d956ea29a0879c8e (patch) | |
| tree | f902b895aa25142f94001674baedfdac9794d548 /src/core/hle/kernel/thread.cpp | |
| parent | Kernel: Updated various kernel function "name" arguments to be const references. (diff) | |
| download | yuzu-c95972275e276abe3afcac79d956ea29a0879c8e.tar.gz yuzu-c95972275e276abe3afcac79d956ea29a0879c8e.tar.xz yuzu-c95972275e276abe3afcac79d956ea29a0879c8e.zip | |
HLE: Updated all uses of NULL to nullptr (to be C++11 compliant)
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 5fdb4fbe6..700f4ea7c 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -223,7 +223,7 @@ void SwitchContext(Thread* t) { | |||
| 223 | t->wait_type = WAITTYPE_NONE; | 223 | t->wait_type = WAITTYPE_NONE; |
| 224 | LoadContext(t->context); | 224 | LoadContext(t->context); |
| 225 | } else { | 225 | } else { |
| 226 | SetCurrentThread(NULL); | 226 | SetCurrentThread(nullptr); |
| 227 | } | 227 | } |
| 228 | } | 228 | } |
| 229 | 229 | ||
| @@ -238,7 +238,7 @@ Thread* NextThread() { | |||
| 238 | next = g_thread_ready_queue.pop_first(); | 238 | next = g_thread_ready_queue.pop_first(); |
| 239 | } | 239 | } |
| 240 | if (next == 0) { | 240 | if (next == 0) { |
| 241 | return NULL; | 241 | return nullptr; |
| 242 | } | 242 | } |
| 243 | return Kernel::g_object_pool.GetFast<Thread>(next); | 243 | return Kernel::g_object_pool.GetFast<Thread>(next); |
| 244 | } | 244 | } |
| @@ -312,8 +312,8 @@ Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 prio | |||
| 312 | Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s32 processor_id, | 312 | Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s32 processor_id, |
| 313 | u32 stack_top, int stack_size) { | 313 | u32 stack_top, int stack_size) { |
| 314 | 314 | ||
| 315 | if (name == NULL) { | 315 | if (name == nullptr) { |
| 316 | ERROR_LOG(KERNEL, "CreateThread(): NULL name"); | 316 | ERROR_LOG(KERNEL, "CreateThread(): nullptr name"); |
| 317 | return -1; | 317 | return -1; |
| 318 | } | 318 | } |
| 319 | if ((u32)stack_size < 0x200) { | 319 | if ((u32)stack_size < 0x200) { |
| @@ -353,19 +353,19 @@ Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s3 | |||
| 353 | /// Get the priority of the thread specified by handle | 353 | /// Get the priority of the thread specified by handle |
| 354 | u32 GetThreadPriority(const Handle handle) { | 354 | u32 GetThreadPriority(const Handle handle) { |
| 355 | Thread* thread = g_object_pool.GetFast<Thread>(handle); | 355 | Thread* thread = g_object_pool.GetFast<Thread>(handle); |
| 356 | _assert_msg_(KERNEL, (thread != NULL), "called, but thread is NULL!"); | 356 | _assert_msg_(KERNEL, (thread != nullptr), "called, but thread is nullptr!"); |
| 357 | return thread->current_priority; | 357 | return thread->current_priority; |
| 358 | } | 358 | } |
| 359 | 359 | ||
| 360 | /// Set the priority of the thread specified by handle | 360 | /// Set the priority of the thread specified by handle |
| 361 | Result SetThreadPriority(Handle handle, s32 priority) { | 361 | Result SetThreadPriority(Handle handle, s32 priority) { |
| 362 | Thread* thread = NULL; | 362 | Thread* thread = nullptr; |
| 363 | if (!handle) { | 363 | if (!handle) { |
| 364 | thread = GetCurrentThread(); // TODO(bunnei): Is this correct behavior? | 364 | thread = GetCurrentThread(); // TODO(bunnei): Is this correct behavior? |
| 365 | } else { | 365 | } else { |
| 366 | thread = g_object_pool.GetFast<Thread>(handle); | 366 | thread = g_object_pool.GetFast<Thread>(handle); |
| 367 | } | 367 | } |
| 368 | _assert_msg_(KERNEL, (thread != NULL), "called, but thread is NULL!"); | 368 | _assert_msg_(KERNEL, (thread != nullptr), "called, but thread is nullptr!"); |
| 369 | 369 | ||
| 370 | // If priority is invalid, clamp to valid range | 370 | // If priority is invalid, clamp to valid range |
| 371 | if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { | 371 | if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { |