Replace SDL_assert() by assert()

SDL_assert() open a dialog on assertion failure.

There is no reason not to use assert() directly.
This commit is contained in:
Romain Vimont
2019-11-27 21:11:40 +01:00
parent b5ebb234dd
commit 510caff0cd
15 changed files with 49 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
#include "control_msg.h"
#include <assert.h>
#include <string.h>
#include <SDL2/SDL_assert.h>
#include "config.h"
#include "util/buffer_util.h"
@@ -27,7 +27,7 @@ write_string(const char *utf8, size_t max_len, unsigned char *buf) {
static uint16_t
to_fixed_point_16(float f) {
SDL_assert(f >= 0.0f && f <= 1.0f);
assert(f >= 0.0f && f <= 1.0f);
uint32_t u = f * 0x1p16f; // 2^16
if (u >= 0xffff) {
u = 0xffff;