diff options
author | jsala <javier.salamanca.munoz@gmail.com> | 2022-06-21 21:25:50 +0200 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-09-04 20:04:23 +0200 |
commit | 9e7e95a57b7c16941d9fdc59f806c1f9e4263379 (patch) | |
tree | 2311a80a98bd31b703708d946a5905d980835bca /compilerplugins/clang | |
parent | 42d197ef301db68e56f7e45b6e36ace5fae04b4d (diff) |
tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro
Change associated for by std::find_if in sqlbison.y
Also change some integer by std::size_t
Change-Id: I0d2100fbd7c22729da6ce0462c6cc093e0767fb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136263
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/test/constvars.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/test/stringliteralvar.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/test/constvars.cxx b/compilerplugins/clang/test/constvars.cxx index 88df50f8e199..80acdb67528d 100644 --- a/compilerplugins/clang/test/constvars.cxx +++ b/compilerplugins/clang/test/constvars.cxx @@ -22,8 +22,8 @@ namespace test1 { int const aFormalArgs[] = { 1, 2 }; // expected-error@+1 {{var can be const [loplugin:constvars]}} -static sal_uInt16 nMediaArgsCount = SAL_N_ELEMENTS(aFormalArgs); -sal_uInt16 foo() +static std::size_t const nMediaArgsCount = std::size(aFormalArgs); +std::size_t foo() { (void)aFormalArgs; return nMediaArgsCount; diff --git a/compilerplugins/clang/test/stringliteralvar.cxx b/compilerplugins/clang/test/stringliteralvar.cxx index f04e54756284..a73f1c51dbd9 100644 --- a/compilerplugins/clang/test/stringliteralvar.cxx +++ b/compilerplugins/clang/test/stringliteralvar.cxx @@ -84,7 +84,7 @@ void f9() // expected-error-re@+1 {{change type of variable 'literal' from constant character array ('const sal_Unicode{{ ?}}[3]'{{( \(aka 'const char16_t\[3\]'\))?}}) to OUStringLiteral [loplugin:stringliteralvar]}} static sal_Unicode const literal[] = { 'f', 'o', 'o' }; // expected-note-re@+1 {{first passed into a '{{(rtl::)?}}OUString' constructor here [loplugin:stringliteralvar]}} - f(OUString(literal, SAL_N_ELEMENTS(literal))); + f(OUString(literal, std::size(literal))); } void f10() |