diff options
author | Cristian RodrÃguez <crrodriguez@opensuse.org> | 2012-04-05 19:39:37 -0300 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2012-04-06 09:52:06 +1000 |
commit | f0296255918f6665fe9910874df2fd39ca039f30 (patch) | |
tree | 531ab784dc77bb316b263fb0ca355db7cb8b6c5f /src/libFLAC/bitwriter.c | |
parent | d30fe60fc616d626df2336e91bc698677a732447 (diff) | |
download | flac-f0296255918f6665fe9910874df2fd39ca039f30.tar.gz |
V2: Use a single definition of MIN and MAX in sources
Diffstat (limited to 'src/libFLAC/bitwriter.c')
-rw-r--r-- | src/libFLAC/bitwriter.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libFLAC/bitwriter.c b/src/libFLAC/bitwriter.c index 7da4b159..44914d1c 100644 --- a/src/libFLAC/bitwriter.c +++ b/src/libFLAC/bitwriter.c @@ -37,6 +37,7 @@ #include <string.h> #include "private/bitwriter.h" #include "private/crc.h" +#include "private/macros.h" #include "FLAC/assert.h" #include "share/alloc.h" #include "share/endswap.h" @@ -67,11 +68,6 @@ static const unsigned FLAC__BITWRITER_DEFAULT_INCREMENT = 4096u / sizeof(uint32_ #define FLAC__WORDS_TO_BITS(words) ((words) * FLAC__BITS_PER_WORD) #define FLAC__TOTAL_BITS(bw) (FLAC__WORDS_TO_BITS((bw)->words) + (bw)->bits) -#ifdef min -#undef min -#endif -#define min(x,y) ((x)<(y)?(x):(y)) - /* adjust for compilers that can't understand using LLU suffix for uint64_t literals */ #ifdef _MSC_VER #define FLAC__U64L(x) x @@ -288,7 +284,7 @@ FLaC__INLINE FLAC__bool FLAC__bitwriter_write_zeroes(FLAC__BitWriter *bw, unsign return false; /* first part gets to word alignment */ if(bw->bits) { - n = min(FLAC__BITS_PER_WORD - bw->bits, bits); + n = flac_min(FLAC__BITS_PER_WORD - bw->bits, bits); bw->accum <<= n; bits -= n; bw->bits += n; |