mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-10-31 07:59:02 -05:00 
			
		
		
		
	general: Convert assertion macros over to be fmt-compatible
This commit is contained in:
		| @@ -10,12 +10,12 @@ namespace Kernel { | ||||
| ObjectAddressTable g_object_address_table; | ||||
|  | ||||
| void ObjectAddressTable::Insert(VAddr addr, SharedPtr<Object> obj) { | ||||
|     ASSERT_MSG(objects.find(addr) == objects.end(), "Object already exists with addr=0x%lx", addr); | ||||
|     ASSERT_MSG(objects.find(addr) == objects.end(), "Object already exists with addr={:#X}", addr); | ||||
|     objects[addr] = obj; | ||||
| } | ||||
|  | ||||
| void ObjectAddressTable::Close(VAddr addr) { | ||||
|     ASSERT_MSG(objects.find(addr) != objects.end(), "Object does not exist with addr=0x%lx", addr); | ||||
|     ASSERT_MSG(objects.find(addr) != objects.end(), "Object does not exist with addr={:#X}", addr); | ||||
|     objects.erase(addr); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -539,7 +539,7 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V | ||||
|                     processor_id); | ||||
|         break; | ||||
|     default: | ||||
|         ASSERT_MSG(false, "Unsupported thread processor ID: %d", processor_id); | ||||
|         ASSERT_MSG(false, "Unsupported thread processor ID: {}", processor_id); | ||||
|         break; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -175,11 +175,11 @@ void Thread::ResumeFromWait() { | ||||
|         return; | ||||
|  | ||||
|     case THREADSTATUS_RUNNING: | ||||
|         DEBUG_ASSERT_MSG(false, "Thread with object id %u has already resumed.", GetObjectId()); | ||||
|         DEBUG_ASSERT_MSG(false, "Thread with object id {} has already resumed.", GetObjectId()); | ||||
|         return; | ||||
|     case THREADSTATUS_DEAD: | ||||
|         // This should never happen, as threads must complete before being stopped. | ||||
|         DEBUG_ASSERT_MSG(false, "Thread with object id %u cannot be resumed because it's DEAD.", | ||||
|         DEBUG_ASSERT_MSG(false, "Thread with object id {} cannot be resumed because it's DEAD.", | ||||
|                          GetObjectId()); | ||||
|         return; | ||||
|     } | ||||
|   | ||||
| @@ -245,8 +245,8 @@ VMManager::VMAIter VMManager::StripIterConstness(const VMAHandle& iter) { | ||||
| } | ||||
|  | ||||
| ResultVal<VMManager::VMAIter> VMManager::CarveVMA(VAddr base, u64 size) { | ||||
|     ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: 0x%16" PRIx64, size); | ||||
|     ASSERT_MSG((base & Memory::PAGE_MASK) == 0, "non-page aligned base: 0x%016" PRIx64, base); | ||||
|     ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: {:#018X}", size); | ||||
|     ASSERT_MSG((base & Memory::PAGE_MASK) == 0, "non-page aligned base: {:#018X}", base); | ||||
|  | ||||
|     VMAIter vma_handle = StripIterConstness(FindVMA(base)); | ||||
|     if (vma_handle == vma_map.end()) { | ||||
| @@ -281,8 +281,8 @@ ResultVal<VMManager::VMAIter> VMManager::CarveVMA(VAddr base, u64 size) { | ||||
| } | ||||
|  | ||||
| ResultVal<VMManager::VMAIter> VMManager::CarveVMARange(VAddr target, u64 size) { | ||||
|     ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: 0x%16" PRIx64, size); | ||||
|     ASSERT_MSG((target & Memory::PAGE_MASK) == 0, "non-page aligned base: 0x%016" PRIx64, target); | ||||
|     ASSERT_MSG((size & Memory::PAGE_MASK) == 0, "non-page aligned size: {:#018X}", size); | ||||
|     ASSERT_MSG((target & Memory::PAGE_MASK) == 0, "non-page aligned base: {:#018X}", target); | ||||
|  | ||||
|     VAddr target_end = target + size; | ||||
|     ASSERT(target_end >= target); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Lioncash
					Lioncash