From 5cffb796e9a414e8effddb5f9f097c10d0b3f53f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sun, 23 Dec 2007 00:16:44 +0100 Subject: Simplify code by returning immediately if the condition is not met. --- src/spu_dec/cc_decoder.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/spu_dec/cc_decoder.c b/src/spu_dec/cc_decoder.c index 748cd7232..49538ca66 100644 --- a/src/spu_dec/cc_decoder.c +++ b/src/spu_dec/cc_decoder.c @@ -896,11 +896,11 @@ static int cc_renderer_on_display(cc_renderer_t *this) static void cc_renderer_hide_caption(cc_renderer_t *this, int64_t vpts) { - if (this->displayed) { - this->osd_renderer->hide(this->cap_display, vpts); - this->displayed = 0; - this->last_hide_vpts = vpts; - } + if ( ! this->displayed ) return; + + this->osd_renderer->hide(this->cap_display, vpts); + this->displayed = 0; + this->last_hide_vpts = vpts; } -- cgit v1.2.3