vkd3d-common: Replace assert() with VKD3D_ASSERT().

This commit is contained in:
Henri Verbeet 2024-08-13 14:16:35 +02:00
parent 355d4c4a86
commit cd9879f237
Notes: Henri Verbeet 2024-08-13 21:27:22 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/994
2 changed files with 1 additions and 3 deletions

View File

@ -19,7 +19,6 @@
#ifndef __VKD3D_MEMORY_H #ifndef __VKD3D_MEMORY_H
#define __VKD3D_MEMORY_H #define __VKD3D_MEMORY_H
#include <assert.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -44,7 +43,7 @@ static inline void *vkd3d_realloc(void *ptr, size_t size)
static inline void *vkd3d_calloc(size_t count, size_t size) static inline void *vkd3d_calloc(size_t count, size_t size)
{ {
void *ptr; void *ptr;
assert(count <= ~(size_t)0 / size); VKD3D_ASSERT(count <= ~(size_t)0 / size);
if (!(ptr = calloc(count, size))) if (!(ptr = calloc(count, size)))
ERR("Out of memory.\n"); ERR("Out of memory.\n");
return ptr; return ptr;

View File

@ -22,7 +22,6 @@
#include "vkd3d_common.h" #include "vkd3d_common.h"
#include <assert.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>