1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 14:31:17 +00:00

assert macro OK (#755)

* create assert macro and replace a bunch of __assert

Signed-off-by: angie <angheloalf95@gmail.com>

* Another bunch of assert

Signed-off-by: angie <angheloalf95@gmail.com>

* more assert

Signed-off-by: angie <angheloalf95@gmail.com>

* assert(false)

Signed-off-by: angie <angheloalf95@gmail.com>

* last assert used in matching code

Signed-off-by: angie <angheloalf95@gmail.com>

* the non-matchings

Signed-off-by: angie <angheloalf95@gmail.com>

* typo

Signed-off-by: angie <angheloalf95@gmail.com>

* format

Signed-off-by: angie <angheloalf95@gmail.com>

* change macro to uppercase

Signed-off-by: angie <angheloalf95@gmail.com>

* Apply suggestions from code review

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Change ASSERT(false) to ASSERT(0)

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
Anghelo Carvajal 2021-04-29 14:39:46 -04:00 committed by GitHub
parent 0b8252cfe9
commit 98aef8988a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 148 additions and 301 deletions

View file

@ -578,9 +578,7 @@ Gfx* EnBox_EmptyDList(GraphicsContext* gfxCtx) {
Gfx* dList;
dList = Graph_Alloc(gfxCtx, sizeof(Gfx));
if (dList == NULL) {
__assert("gfxp != NULL", "../z_en_box.c", 1528);
}
ASSERT(dList != NULL, "gfxp != NULL", "../z_en_box.c", 1528);
dListHead = dList;
gSPEndDisplayList(dListHead++);
@ -594,9 +592,7 @@ Gfx* func_809CA4A0(GraphicsContext* gfxCtx) {
Gfx* dListHead;
dListHead = Graph_Alloc(gfxCtx, 2 * sizeof(Gfx));
if (dListHead == NULL) {
__assert("gfxp != NULL", "../z_en_box.c", 1546);
}
ASSERT(dListHead != NULL, "gfxp != NULL", "../z_en_box.c", 1546);
dList = dListHead;
gDPSetRenderMode(dListHead++,
@ -614,9 +610,7 @@ Gfx* func_809CA518(GraphicsContext* gfxCtx) {
Gfx* dListHead;
dListHead = Graph_Alloc(gfxCtx, 2 * sizeof(Gfx));
if (dListHead == NULL) {
__assert("gfxp != NULL", "../z_en_box.c", 1564);
}
ASSERT(dListHead != NULL, "gfxp != NULL", "../z_en_box.c", 1564);
dList = dListHead;
gDPSetRenderMode(dListHead++,