diff options
author | jsala <javier.salamanca.munoz@gmail.com> | 2022-06-25 13:35:01 +0200 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-11-06 01:22:27 +0100 |
commit | 04a58d7eae2b26559efd48ff7cdd23cec1c2187c (patch) | |
tree | a43067d9b24d5c86a8fa2f299f8f7c807ff96ebb /unotest | |
parent | 804f21e42bdc9328ab0f17b983411657e1f6215d (diff) |
tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Also change some range based for.
Change-Id: I32c5cbe0033c40cde3f1fc86ec8af90e558f2652
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141666
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'unotest')
-rw-r--r-- | unotest/source/cpp/filters-test.cxx | 2 | ||||
-rw-r--r-- | unotest/source/cpp/officeconnection.cxx | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/unotest/source/cpp/filters-test.cxx b/unotest/source/cpp/filters-test.cxx index 7adbd9ca4d4d..1eaaa6219783 100644 --- a/unotest/source/cpp/filters-test.cxx +++ b/unotest/source/cpp/filters-test.cxx @@ -29,7 +29,7 @@ static void decode(const OUString& rIn, const OUString &rOut) //mcrypt --bare -a arcfour -o hex -k 435645 -s 3 const sal_uInt8 aKey[3] = {'C', 'V', 'E'}; - rtlCipherError result = rtl_cipher_init(cipher, rtl_Cipher_DirectionDecode, aKey, SAL_N_ELEMENTS(aKey), nullptr, 0); + rtlCipherError result = rtl_cipher_init(cipher, rtl_Cipher_DirectionDecode, aKey, std::size(aKey), nullptr, 0); CPPUNIT_ASSERT_EQUAL_MESSAGE("cipher init failed", rtl_Cipher_E_None, result); diff --git a/unotest/source/cpp/officeconnection.cxx b/unotest/source/cpp/officeconnection.cxx index 649d636d0fa6..850b19440d00 100644 --- a/unotest/source/cpp/officeconnection.cxx +++ b/unotest/source/cpp/officeconnection.cxx @@ -29,7 +29,6 @@ #include <osl/process.h> #include <osl/test/uniquepipename.hxx> #include <osl/time.h> -#include <sal/macros.h> #include <unotest/getargument.hxx> #include <unotest/officeconnection.hxx> #include <unotest/toabsolutefileurl.hxx> @@ -81,7 +80,7 @@ void OfficeConnection::setUp() { osl_executeProcess( toAbsoluteFileUrl( argSoffice.copy(RTL_CONSTASCII_LENGTH("path:"))).pData, - args, SAL_N_ELEMENTS(args), 0, nullptr, nullptr, envs, envs == nullptr ? 0 : 1, + args, std::size(args), 0, nullptr, nullptr, envs, envs == nullptr ? 0 : 1, &process_)); } else if (argSoffice.match("connect:")) { desc = argSoffice.copy(RTL_CONSTASCII_LENGTH("connect:")); |