diff options
author | VaibhavMalik4187 <vaibhavmalik2018@gmail.com> | 2022-02-04 17:36:52 +0530 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-02-06 21:38:32 +0100 |
commit | 8b327cd86d71d71d2f5f883321e5d53e3b42ed4e (patch) | |
tree | 1385e7eb779abd43508048850b688ef8e4650c9b /codemaker/source | |
parent | 6bbc2eba29389bf7937ab5fd08b62821cbd56a97 (diff) |
tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change-Id: I4f5258ca5b37e9b1b4237c5d29e4a9e5362fa855
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129116
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'codemaker/source')
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index d64c79a36c2c..e5436c9049f5 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -143,12 +143,10 @@ bool isBootstrapType(OUString const & name) "com.sun.star.uno.XWeak", "com.sun.star.util.XMacroExpander" }; // cf. cppuhelper/unotypes/Makefile UNOTYPES (plus missing dependencies) - for (std::size_t i = 0; i < SAL_N_ELEMENTS(names); ++i) { - if (name.equalsAscii(names[i])) { - return true; - } - } - return false; + auto const pred = [&name](const char* aName) { + return name.equalsAscii(aName); + }; + return std::any_of(std::begin(names), std::end(names), pred); } class CppuType |