ams-libs: AMS_ASSERT no longer invokes expression
This commit is contained in:
@@ -63,8 +63,11 @@ namespace ams::mem::impl::heap {
|
||||
|
||||
bool CachedHeap::CheckCache() {
|
||||
bool cache = false;
|
||||
auto err = this->Query(AllocQuery_CheckCache, std::addressof(cache));
|
||||
AMS_ASSERT(err != 0);
|
||||
|
||||
const auto err = this->Query(AllocQuery_CheckCache, std::addressof(cache));
|
||||
AMS_ASSERT(err == 0);
|
||||
AMS_UNUSED(err);
|
||||
|
||||
return cache;
|
||||
}
|
||||
|
||||
|
||||
@@ -1151,8 +1151,9 @@ namespace ams::mem::impl::heap {
|
||||
}
|
||||
|
||||
if (start_alignup < end_aligndown) {
|
||||
auto err = this->FreePhysical(reinterpret_cast<void *>(start_alignup), end_aligndown - start_alignup);
|
||||
const auto err = this->FreePhysical(reinterpret_cast<void *>(start_alignup), end_aligndown - start_alignup);
|
||||
AMS_ASSERT(err == 0);
|
||||
AMS_UNUSED(err);
|
||||
}
|
||||
} else {
|
||||
this->MergeIntoFreeList(span);
|
||||
|
||||
@@ -167,8 +167,9 @@ namespace ams::mem {
|
||||
}
|
||||
}
|
||||
|
||||
auto err = GetCentral(this->central_heap_storage)->Free(ptr);
|
||||
const auto err = GetCentral(this->central_heap_storage)->Free(ptr);
|
||||
AMS_ASSERT(err == 0);
|
||||
AMS_UNUSED(err);
|
||||
}
|
||||
|
||||
void *StandardAllocator::Reallocate(void *ptr, size_t new_size) {
|
||||
@@ -248,8 +249,9 @@ namespace ams::mem {
|
||||
void StandardAllocator::CleanUpManagementArea() const {
|
||||
AMS_ASSERT(this->initialized);
|
||||
|
||||
auto err = GetCentral(this->central_heap_storage)->Query(impl::AllocQuery_UnifyFreeList);
|
||||
const auto err = GetCentral(this->central_heap_storage)->Query(impl::AllocQuery_UnifyFreeList);
|
||||
AMS_ASSERT(err == 0);
|
||||
AMS_UNUSED(err);
|
||||
}
|
||||
|
||||
size_t StandardAllocator::GetSizeOf(const void *ptr) const {
|
||||
|
||||
Reference in New Issue
Block a user