diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-10-05 07:54:03 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-10-07 17:17:19 +0200 |
commit | bf9a1e31a194adfdbb7116455633b9046b34504c (patch) | |
tree | 53b90400cea484d9ad6da0c93b67da6bb351fba8 /examples | |
parent | d20bdbb041948737df13934418b8a3ec4979fc9b (diff) | |
download | qtmultimedia-bf9a1e31a194adfdbb7116455633b9046b34504c.tar.gz |
Port from container::count() and length() to size()
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:
auto QtContainerClass = anyOf(
expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
makeRule(cxxMemberCallExpr(on(QtContainerClass),
callee(cxxMethodDecl(hasAnyName({"count", "length"),
parameterCountIs(0))))),
changeTo(cat(access(o, cat("size"), "()"))),
cat("use 'size()' instead of 'count()/length()'"))
a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.
Change-Id: I90d9db5c161f499cfabf3ce41f55c3cc4d4ff5d4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions