sal/osl/w32/file_dirvol.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit d87694cf9396ec557031a93cc8b92b01720b69e0
Author:     Ahmed Khaled <gostahmedkha...@gmail.com>
AuthorDate: Tue Mar 18 02:45:18 2025 +0200
Commit:     David Gilbert <freedesk...@treblig.org>
CommitDate: Mon Apr 28 02:58:59 2025 +0200

    tdf#147021 Use std::size() instead of SAL_N_ELEMENTS()
    
    Change-Id: I327c2724b2212551c8f957b5b4c151e317094fa2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183050
    Reviewed-by: David Gilbert <freedesk...@treblig.org>
    Tested-by: Jenkins

diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index 0064e170641a..6be7a1152710 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -1046,16 +1046,16 @@ static bool is_floppy_volume_mount_point(const 
OUString& path)
     systemPathEnsureSeparator(p);
 
     WCHAR vn[51];
-    if (GetVolumeNameForVolumeMountPointW(o3tl::toW(p.getStr()), vn, 
SAL_N_ELEMENTS(vn)))
+    if (GetVolumeNameForVolumeMountPointW(o3tl::toW(p.getStr()), vn, 
std::size(vn)))
     {
         WCHAR vnfloppy[51];
         if (is_floppy_A_present() &&
-            GetVolumeNameForVolumeMountPointW(FLOPPY_A, vnfloppy, 
SAL_N_ELEMENTS(vnfloppy)) &&
+            GetVolumeNameForVolumeMountPointW(FLOPPY_A, vnfloppy, 
std::size(vnfloppy)) &&
             (0 == wcscmp(vn, vnfloppy)))
             return true;
 
         if (is_floppy_B_present() &&
-            GetVolumeNameForVolumeMountPointW(FLOPPY_B, vnfloppy, 
SAL_N_ELEMENTS(vnfloppy)) &&
+            GetVolumeNameForVolumeMountPointW(FLOPPY_B, vnfloppy, 
std::size(vnfloppy)) &&
             (0 == wcscmp(vn, vnfloppy)))
             return true;
     }
@@ -1113,7 +1113,7 @@ static UINT get_volume_mount_point_drive_type(const 
OUString& path)
     systemPathEnsureSeparator(p);
 
     WCHAR vn[51];
-    if (GetVolumeNameForVolumeMountPointW(o3tl::toW(p.getStr()), vn, 
SAL_N_ELEMENTS(vn)))
+    if (GetVolumeNameForVolumeMountPointW(o3tl::toW(p.getStr()), vn, 
std::size(vn)))
         return GetDriveTypeW(vn);
 
     return DRIVE_NO_ROOT_DIR;
@@ -1356,7 +1356,7 @@ static oslFileError osl_getDriveInfo(
             case DRIVE_REMOTE:
             {
                 WCHAR szBuffer[1024];
-                DWORD const dwBufsizeConst = SAL_N_ELEMENTS(szBuffer);
+                DWORD const dwBufsizeConst = std::size(szBuffer);
                 DWORD dwBufsize = dwBufsizeConst;
 
                 DWORD dwResult = WNetGetConnectionW( cDrive, szBuffer, 
&dwBufsize );
@@ -1375,7 +1375,7 @@ static oslFileError osl_getDriveInfo(
             case DRIVE_FIXED:
             {
                 WCHAR szVolumeNameBuffer[1024];
-                DWORD const dwBufsizeConst = 
SAL_N_ELEMENTS(szVolumeNameBuffer);
+                DWORD const dwBufsizeConst = std::size(szVolumeNameBuffer);
 
                 if ( GetVolumeInformationW( cRoot, szVolumeNameBuffer, 
dwBufsizeConst, nullptr, nullptr, nullptr, nullptr, 0 ) )
                 {

Reply via email to