[vlc-commits] display: remove useless checks
Rémi Denis-Courmont
git at videolan.org
Mon May 21 20:16:20 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 21 20:23:36 2018 +0300| [b9c2ca3d0df34d0bb2c592aea9108cb6dc1a5e81] | committer: Rémi Denis-Courmont
display: remove useless checks
Window can no longer be NULL, and type parameter is never invalid.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9c2ca3d0df34d0bb2c592aea9108cb6dc1a5e81
---
include/vlc_vout_display.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 1d7670fe1e..4dd63446a4 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -372,9 +372,7 @@ static inline vout_window_t *vout_display_NewWindow(vout_display_t *vd, unsigned
{
vout_window_t *wnd = vd->cfg->window;
- if (type != VOUT_WINDOW_TYPE_INVALID && wnd != NULL && type != wnd->type)
- wnd = NULL;
- return wnd;
+ return (type == wnd->type) ? wnd : NULL;
}
static inline bool vout_display_IsWindowed(vout_display_t *vd)
More information about the vlc-commits
mailing list