From cbeaf678889baeaac0776305f3ca289318a1aca7 Mon Sep 17 00:00:00 2001 From: Reimar Döffinger Date: Mon, 30 Dec 2013 12:10:35 +0100 Subject: Avoid using empty macro arguments. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are not supported by all compilers (gcc 2.95 but also older SPARC compilers, see gcc bug #33304 for example), and there is no real need for them. One use of this feature remains in libavdevice/v4l2.c which can't be replaced quite as easily. Signed-off-by: Reimar Döffinger --- libavcodec/mss12.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libavcodec/mss12.h') diff --git a/libavcodec/mss12.h b/libavcodec/mss12.h index a3f9a7ca70..f953167389 100644 --- a/libavcodec/mss12.h +++ b/libavcodec/mss12.h @@ -99,8 +99,8 @@ int ff_mss12_decode_init(MSS12Context *c, int version, SliceContext *sc1, SliceContext *sc2); int ff_mss12_decode_end(MSS12Context *ctx); -#define ARITH_GET_BIT(VERSION) \ -static int arith ## VERSION ## _get_bit(ArithCoder *c) \ +#define ARITH_GET_BIT(prefix) \ +static int prefix ## _get_bit(ArithCoder *c) \ { \ int range = c->high - c->low + 1; \ int bit = 2 * c->value - c->low >= c->high; \ @@ -110,22 +110,22 @@ static int arith ## VERSION ## _get_bit(ArithCoder *c) \ else \ c->high = c->low + (range >> 1) - 1; \ \ - arith ## VERSION ## _normalise(c); \ + prefix ## _normalise(c); \ \ return bit; \ } -#define ARITH_GET_MODEL_SYM(VERSION) \ -static int arith ## VERSION ## _get_model_sym(ArithCoder *c, Model *m) \ +#define ARITH_GET_MODEL_SYM(prefix) \ +static int prefix ## _get_model_sym(ArithCoder *c, Model *m) \ { \ int idx, val; \ \ - idx = arith ## VERSION ## _get_prob(c, m->cum_prob); \ + idx = prefix ## _get_prob(c, m->cum_prob); \ \ val = m->idx2sym[idx]; \ ff_mss12_model_update(m, idx); \ \ - arith ## VERSION ## _normalise(c); \ + prefix ## _normalise(c); \ \ return val; \ } -- cgit v1.2.3