replaced mpd_likely/mpd_unlikely by G_LIKELY/G_UNLIKELY

We want to remove gcc.h eventually. This takes care of all the
G_LIKELY/G_UNLIKELY macros.
This commit is contained in:
Thomas Jansen
2008-12-02 02:22:43 +01:00
parent 4ca24f22f1
commit 2720585731
6 changed files with 18 additions and 16 deletions

View File

@@ -26,6 +26,7 @@
#include <assert.h>
#include <string.h>
#include <math.h>
#include <glib.h>
static inline int
pcm_dither(void)
@@ -40,9 +41,9 @@ pcm_dither(void)
static int32_t
pcm_range(int32_t sample, unsigned bits)
{
if (mpd_unlikely(sample < (-1 << (bits - 1))))
if (G_UNLIKELY(sample < (-1 << (bits - 1))))
return -1 << (bits - 1);
if (mpd_unlikely(sample >= (1 << (bits - 1))))
if (G_UNLIKELY(sample >= (1 << (bits - 1))))
return (1 << (bits - 1)) - 1;
return sample;
}