From 0cdff21582c23863f046c70c22a35f59ff17fd38 Mon Sep 17 00:00:00 2001 From: Sinoxan Date: Thu, 16 Jul 2015 19:01:11 +0100 Subject: [PATCH] Removing unnecessary unsigned checks. --- src/xenia/gpu/gl4/gl4_graphics_system.cc | 4 ++-- src/xenia/kernel/xboxkrnl_threading.cc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xenia/gpu/gl4/gl4_graphics_system.cc b/src/xenia/gpu/gl4/gl4_graphics_system.cc index bb0bbc2a1..287c31685 100644 --- a/src/xenia/gpu/gl4/gl4_graphics_system.cc +++ b/src/xenia/gpu/gl4/gl4_graphics_system.cc @@ -331,7 +331,7 @@ uint64_t GL4GraphicsSystem::ReadRegister(uint32_t addr) { return 0x050002D0; } - assert_true(r >= 0 && r < RegisterFile::kRegisterCount); + assert_true(r < RegisterFile::kRegisterCount); return register_file_.values[r].u32; } @@ -350,7 +350,7 @@ void GL4GraphicsSystem::WriteRegister(uint32_t addr, uint64_t value) { break; } - assert_true(r >= 0 && r < RegisterFile::kRegisterCount); + assert_true(r < RegisterFile::kRegisterCount); register_file_.values[r].u32 = static_cast(value); } diff --git a/src/xenia/kernel/xboxkrnl_threading.cc b/src/xenia/kernel/xboxkrnl_threading.cc index 3176740b2..c073e3a88 100644 --- a/src/xenia/kernel/xboxkrnl_threading.cc +++ b/src/xenia/kernel/xboxkrnl_threading.cc @@ -309,7 +309,7 @@ SHIM_CALL KeSetCurrentProcessType_shim(PPCContext* ppc_context, XELOGD("KeSetCurrentProcessType(%d)", type); - assert_true(type >= 0 && type <= 2); + assert_true(type <= 2); kernel_state->set_process_type(type); } @@ -905,7 +905,7 @@ SHIM_CALL KeWaitForMultipleObjects_shim(PPCContext* ppc_context, count, objects_ptr, wait_type, wait_reason, processor_mode, alertable, timeout_ptr, wait_block_array_ptr); - assert_true(wait_type >= 0 && wait_type <= 1); + assert_true(wait_type <= 1); X_STATUS result = X_STATUS_SUCCESS; @@ -935,7 +935,7 @@ dword_result_t NtWaitForMultipleObjectsEx( dword_t count, pointer_t> handles, dword_t wait_type, dword_t wait_mode, dword_t alertable, pointer_t> timeout_ptr) { - assert_true(wait_type >= 0 && wait_type <= 1); + assert_true(wait_type <= 1); X_STATUS result = X_STATUS_SUCCESS; std::vector> objects(count);