extensions/source/update/check/updatecheck.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit d898620cb47e0d794d4033fdfa13b049f972a9ff Author: Vinit Agarwal <agarwalvinit5...@gmail.com> AuthorDate: Tue Mar 7 02:59:57 2023 +0530 Commit: Hossein <hoss...@libreoffice.org> CommitDate: Thu Mar 9 19:44:36 2023 +0000 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 <hoss...@libreoffice.org> Reviewed-by: Hossein <hoss...@libreoffice.org> diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 46a4d8dbeb61..3bde028f96b1 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];