fix/simplify assert macros (#1929)

This commit is contained in:
TakaRikka
2023-09-16 10:17:56 -07:00
committed by GitHub
parent 3d8048edba
commit 76b94a8916
16 changed files with 112 additions and 112 deletions
+5 -5
View File
@@ -99,8 +99,8 @@ void* JKRSolidHeap::do_alloc(u32 size, int alignment) {
// TODO(Julgodis): JUTAssertion::setConfirmMessage
if (alignment != 0) {
int u = abs(alignment);
JUT_ASSERT(__FILE__, 0xdb, u < 0x80);
JUT_ASSERT(__FILE__, 0xdc, JGadget::binary::isPower2(u));
JUT_ASSERT(219, u < 0x80);
JUT_ASSERT(220, JGadget::binary::isPower2(u));
}
#endif
@@ -266,8 +266,8 @@ bool JKRSolidHeap::dump(void) {
/* 802D11FC-802D1258 2CBB3C 005C+00 1/0 0/0 0/0 .text
* state_register__12JKRSolidHeapCFPQ27JKRHeap6TStateUl */
u32 JKRSolidHeap::state_register(JKRHeap::TState* p, u32 id) const {
JUT_ASSERT(__FILE__, 0x25c, p != 0);
JUT_ASSERT(__FILE__, 0x25d, p->getHeap() == this);
JUT_ASSERT(604, p != 0);
JUT_ASSERT(605, p->getHeap() == this);
getState_(p);
setState_u32ID_(p, id);
@@ -279,7 +279,7 @@ u32 JKRSolidHeap::state_register(JKRHeap::TState* p, u32 id) const {
/* 802D1258-802D1288 2CBB98 0030+00 1/0 0/0 0/0 .text
* state_compare__12JKRSolidHeapCFRCQ27JKRHeap6TStateRCQ27JKRHeap6TState */
bool JKRSolidHeap::state_compare(JKRHeap::TState const& r1, JKRHeap::TState const& r2) const {
JUT_ASSERT(__FILE__, 632, r1.getHeap() == r2.getHeap());
JUT_ASSERT(632, r1.getHeap() == r2.getHeap());
bool result = true;
if (r1.getCheckCode() != r2.getCheckCode()) {