1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-05 09:48:42 +00:00

[ORBIS] Fix __assert

This commit is contained in:
Francisco José García García 2018-12-27 20:18:53 +01:00
parent f02ef2e0c6
commit 19549ddccf
4 changed files with 10 additions and 5 deletions

View File

@ -4,7 +4,7 @@
/* Common implementation of NTSC filters */
#include <assert.h>
#include <retro_assert.h>
#include <math.h>
/* Copyright (C) 2006 Shay Green. This module is free software; you
@ -121,7 +121,7 @@ static void init_filters( init_t* impl, snes_ntsc_setup_t const* setup )
{
int x = kernel_size * 3 / 2 - kernel_half + i;
kernels [x] *= sum;
assert( kernels [x] == kernels [x] ); /* catch numerical instability */
retro_assert( kernels [x] == kernels [x] ); /* catch numerical instability */
}
}
@ -156,7 +156,7 @@ static void init_filters( init_t* impl, snes_ntsc_setup_t const* setup )
for ( x = i; x < kernel_size; x += 2 )
{
kernels [x] *= sum;
assert( kernels [x] == kernels [x] ); /* catch numerical instability */
retro_assert( kernels [x] == kernels [x] ); /* catch numerical instability */
}
}
}

View File

@ -55,6 +55,8 @@
#ifdef HAVE_DR_MP3
#define DR_MP3_IMPLEMENTATION
#include <retro_assert.h>
#define DRMP3_ASSERT(expression) retro_assert(expression)
#include <dr/dr_mp3.h>
#endif

View File

@ -419,7 +419,7 @@ static INLINE int rjpeg__jpeg_huff_decode(rjpeg__jpeg *j, rjpeg__huffman *h)
/* convert the huffman code to the symbol id */
c = ((j->code_buffer >> (32 - k)) & rjpeg__bmask[k]) + h->delta[k];
assert((((j->code_buffer) >> (32 - h->size[c])) & rjpeg__bmask[h->size[c]]) == h->code[c]);
retro_assert((((j->code_buffer) >> (32 - h->size[c])) & rjpeg__bmask[h->size[c]]) == h->code[c]);
/* convert the id to a symbol */
j->code_bits -= k;
@ -441,7 +441,7 @@ static INLINE int rjpeg__extend_receive(rjpeg__jpeg *j, int n)
sgn = (int32_t)j->code_buffer >> 31; /* sign bit is always in MSB */
k = rjpeg_lrot(j->code_buffer, n);
assert(n >= 0 && n < (int) (sizeof(rjpeg__bmask)/sizeof(*rjpeg__bmask)));
retro_assert(n >= 0 && n < (int) (sizeof(rjpeg__bmask)/sizeof(*rjpeg__bmask)));
j->code_buffer = k & ~rjpeg__bmask[n];
k &= rjpeg__bmask[n];
j->code_bits -= n;

View File

@ -24,6 +24,9 @@
#include <features/features_cpu.h>
#define DG_DYNARR_IMPLEMENTATION
#include <stdio.h>
#include <retro_assert.h>
#define DG_DYNARR_ASSERT(cond, msg) (void)0
#include <array/dynarray.h>
#undef DG_DYNARR_IMPLEMENTATION