[vlc-commits] direct3d11: factorize the same string usage

Steve Lhomme git at videolan.org
Tue Mar 21 18:36:59 CET 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Mar 20 16:44:49 2017 +0100| [799625e0d6f670306f5fe59b7d8cca2ae43fd48c] | committer: Hugo Beauzée-Luyssen

direct3d11: factorize the same string usage

--
replaces https://patches.videolan.org/patch/16041/
- fix double semi-colon

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=799625e0d6f670306f5fe59b7d8cca2ae43fd48c
---

 modules/video_output/win32/direct3d11.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 781103d..a1323ec 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1588,10 +1588,11 @@ static HRESULT CompilePixelShader(vout_display_t *vd, const d3d_format_t *format
 {
     vout_display_sys_t *sys = vd->sys;
 
+    static const char *DEFAULT_NOOP = "return rgb";
     const char *psz_sampler;
-    const char *psz_src_transform     = "return rgb";
-    const char *psz_display_transform = "return rgb";
-    const char *psz_tone_mapping      = "return rgb";
+    const char *psz_src_transform     = DEFAULT_NOOP;
+    const char *psz_display_transform = DEFAULT_NOOP;
+    const char *psz_tone_mapping      = DEFAULT_NOOP;
 
     switch (format->formatTexture)
     {



More information about the vlc-commits mailing list