[client] all: replace assert with DEBUG_ASSERT

This commit is contained in:
Quantum
2021-08-13 19:51:36 -04:00
committed by Geoffrey McRae
parent 85a96d1e06
commit 579f998519
12 changed files with 48 additions and 56 deletions

View File

@@ -804,7 +804,7 @@ int app_renderOverlay(struct Rect * rects, int maxRects)
// It is an error to run out of rectangles, because we will not be able to
// correctly calculate the damage of the next frame.
assert(written >= 0);
DEBUG_ASSERT(written >= 0);
const int toAdd = max(written, overlay->lastRectCount);
totalDamage |= toAdd > maxRects;

View File

@@ -20,9 +20,9 @@
#include "ll.h"
#include "common/debug.h"
#include "common/locking.h"
#include <stdlib.h>
#include <assert.h>
struct ll_item
{
@@ -53,7 +53,7 @@ struct ll * ll_new(void)
void ll_free(struct ll * list)
{
// never free a list with items in it!
assert(!list->head);
DEBUG_ASSERT(!list->head);
LG_LOCK_FREE(list->lock);
free(list);

View File

@@ -33,7 +33,6 @@
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <assert.h>
#include <math.h>
#include <stdatomic.h>
#include <linux/input.h>
@@ -854,7 +853,7 @@ static int lg_run(void)
break;
}
assert(g_state.ds);
DEBUG_ASSERT(g_state.ds);
ASSERT_LG_DS_VALID(g_state.ds);
if (g_params.jitRender)