[vlc-commits] win32: use the VLC ARRAY_SIZE macro

Steve Lhomme git at videolan.org
Thu May 2 09:56:01 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu May  2 09:51:03 2019 +0200| [c30102b44a661111d7e45a910482ddf3c194c99d] | committer: Steve Lhomme

win32: use the VLC ARRAY_SIZE macro

Rather than the windows ARRAYSIZE() which ends up as sizeof(*RtlpNumberOf(A))
mostly for C++.

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

 modules/video_output/win32/direct3d9.c | 2 +-
 modules/video_output/win32/events.c    | 4 ++--
 modules/video_output/win32/window.c    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index a31998037c..4586973f4e 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -206,7 +206,7 @@ static HINSTANCE Direct3D9LoadShaderLibrary(void)
     HINSTANCE instance = NULL;
     for (int i = 43; i > 23; --i) {
         WCHAR filename[16];
-        _snwprintf(filename, ARRAYSIZE(filename), TEXT("D3dx9_%d.dll"), i);
+        _snwprintf(filename, ARRAY_SIZE(filename), TEXT("D3dx9_%d.dll"), i);
         instance = LoadLibrary(filename);
         if (instance)
             break;
diff --git a/modules/video_output/win32/events.c b/modules/video_output/win32/events.c
index deeb24a84a..9e8df25be3 100644
--- a/modules/video_output/win32/events.c
+++ b/modules/video_output/win32/events.c
@@ -159,8 +159,8 @@ event_thread_t *EventThreadCreate( vlc_object_t *obj, vout_window_t *parent_wind
 
     p_event->parent_window = parent_window;
 
-    _snwprintf( p_event->class_video, ARRAYSIZE(p_event->class_video),
-               TEXT("VLC video output %p"), (void *)p_event );
+    _snwprintf( p_event->class_video, ARRAY_SIZE(p_event->class_video),
+                TEXT("VLC video output %p"), (void *)p_event );
     return p_event;
 }
 
diff --git a/modules/video_output/win32/window.c b/modules/video_output/win32/window.c
index 958f527a69..ff25b11dde 100644
--- a/modules/video_output/win32/window.c
+++ b/modules/video_output/win32/window.c
@@ -713,7 +713,7 @@ static int Open(vout_window_t *wnd)
     if (unlikely(sys == NULL))
         return VLC_ENOMEM;
 
-    _snwprintf( sys->class_main, ARRAYSIZE(sys->class_main),
+    _snwprintf( sys->class_main, ARRAY_SIZE(sys->class_main),
                TEXT("VLC standalone window %p"), (void *)sys );
 
     HINSTANCE hInstance = GetModuleHandle(NULL);



More information about the vlc-commits mailing list