sal/osl/unx/nlsupport.cxx |    2 +-
 sal/osl/unx/process.cxx   |    2 +-
 sal/osl/unx/signal.cxx    |    2 +-
 sal/osl/unx/tempfile.cxx  |    2 +-
 sal/osl/unx/thread.cxx    |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 99d6cfe00c3a194d40e2a4b6992954dfcec33b99
Author:     Nguyen <[email protected]>
AuthorDate: Fri Nov 14 21:14:17 2025 -0800
Commit:     Hossein <[email protected]>
CommitDate: Mon Nov 24 01:01:05 2025 +0100

    tdf#147021 Use std::[s]size() instead of SAL_N_ELEMENTS() macro
    
    Change-Id: I8de92ddceca8eea0e5cd8d951df7168df4183889
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194048
    Reviewed-by: Hossein <[email protected]>
    Tested-by: Jenkins

diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx
index bf9073ab396b..263439e3097e 100644
--- a/sal/osl/unx/nlsupport.cxx
+++ b/sal/osl/unx/nlsupport.cxx
@@ -606,7 +606,7 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale 
* pLocale )
     /* search the codeset in our language list */
     if ( codeset != nullptr )
     {
-        language = pair_search (codeset, nl_language_list, SAL_N_ELEMENTS( 
nl_language_list ) );
+        language = pair_search (codeset, nl_language_list, std::size( 
nl_language_list ) );
     }
 
     OSL_ASSERT( language && ( RTL_TEXTENCODING_DONTKNOW != language->value ) );
diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index 78ab10888867..7706541a3d6a 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -438,7 +438,7 @@ oslProcessError SAL_CALL 
osl_executeProcess_WithRedirectedIO(
     char szImagePath[PATH_MAX] = "";
     if (!image.isEmpty()
         && (UnicodeToText(
-                szImagePath, SAL_N_ELEMENTS(szImagePath), image.getStr(),
+                szImagePath, std::size(szImagePath), image.getStr(),
                 image.getLength())
             == 0))
     {
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 463d0512d85a..70edcdf7113f 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -126,7 +126,7 @@ what looks like a bug in the new handler*/
     { SIGXCPU,   ACT_ABORT,  SIG_DFL, false }, /* exceeded cpu limit */
     { SIGXFSZ,   ACT_ABORT,  SIG_DFL, false }  /* exceeded file size limit */
 };
-const int NoSignals = SAL_N_ELEMENTS(Signals);
+const auto NoSignals = std::ssize(Signals);
 
 bool bSetSEGVHandler = false;
 bool bSetWINCHHandler = false;
diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx
index 85259f1667f3..bce5b6fd328d 100644
--- a/sal/osl/unx/tempfile.cxx
+++ b/sal/osl/unx/tempfile.cxx
@@ -69,7 +69,7 @@ oslFileError SAL_CALL osl_getTempDirURL( rtl_uString** 
pustrTempDir )
  ******************************************************************/
 
 const char LETTERS[]        = 
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
-const int  COUNT_OF_LETTERS = SAL_N_ELEMENTS(LETTERS) - 1;
+const int  COUNT_OF_LETTERS = std::ssize(LETTERS) - 1;
 
 #define RAND_NAME_LENGTH 6
 
diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx
index 315a049e3a86..7dd2e923e433 100644
--- a/sal/osl/unx/thread.cxx
+++ b/sal/osl/unx/thread.cxx
@@ -576,7 +576,7 @@ struct HashEntry
 }
 
 static HashEntry* HashTable[31];
-const int HashSize = SAL_N_ELEMENTS(HashTable);
+const auto HashSize = std::ssize(HashTable);
 
 static std::mutex HashLock;
 

Reply via email to