ffplay: compact expression in compute_mod()
Prefer "return X ? Y : Z" over "if (x) return Y; else return Z", reduce line count. Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
This commit is contained in:
parent
6873cf9bc8
commit
91b27e49d6
6
ffplay.c
6
ffplay.c
@ -771,11 +771,7 @@ static void video_image_display(VideoState *is)
|
|||||||
|
|
||||||
static inline int compute_mod(int a, int b)
|
static inline int compute_mod(int a, int b)
|
||||||
{
|
{
|
||||||
a = a % b;
|
return a < 0 ? a%b + b : a%b;
|
||||||
if (a >= 0)
|
|
||||||
return a;
|
|
||||||
else
|
|
||||||
return a + b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void video_audio_display(VideoState *s)
|
static void video_audio_display(VideoState *s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user