tdf#147021 - Use std::size() instead of SAL_N_ELEMENTS() macro
Modified updatecheck.cxx where SAL_N_ELEMENTS (nRetryInterval) was used
to get the size of the array. Now it is replaced with std::size().
Change-Id: Ib43ff3ecaeb8e853f14d5b0be45654596a817ec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148367
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 46a4d8d..3bde028 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -542,7 +542,7 @@ UpdateCheckThread::run()
// Increase next by 15, 60, .. minutes
static const sal_Int32 nRetryInterval[] = { 900, 3600, 14400, 86400 };
if( n < SAL_N_ELEMENTS(nRetryInterval) )
if( n < std::size(nRetryInterval) )
++n;
tv.Seconds = nRetryInterval[n-1];
@@ -657,7 +657,7 @@ DownloadThread::run()
// Increase next by 1, 5, 15, 60, .. minutes
static const sal_Int16 nRetryInterval[] = { 60, 300, 900, 3600 };
if( n < SAL_N_ELEMENTS(nRetryInterval) )
if( n < std::size(nRetryInterval) )
++n;
tv.Seconds = nRetryInterval[n-1];