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

Steve Lhomme git at videolan.org
Tue Mar 21 18:47:49 CET 2017


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

direct3d11: factorize the same string usage

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

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

 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