diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-11-11 16:26:04 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-11-18 23:52:04 +0100 |
commit | 4979e677ebc2c85e09bc67939081f70cf78484d2 (patch) | |
tree | 354ce5a4fe65890263de45a55cce245dafeefc09 /tests/auto/particles/qquickwander/tst_qquickwander.cpp | |
parent | 7a501ec6c82c8f8d5997b5d30e667d7820faed1c (diff) |
Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
This is a 6.4 re-run of the script we ran in dev, in order to avoid
conflicts between the branches when cherry-picking.
Change-Id: I5eca3df3179dfb2b2682c75a479ba9a4259cc703
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/particles/qquickwander/tst_qquickwander.cpp')
-rw-r--r-- | tests/auto/particles/qquickwander/tst_qquickwander.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/particles/qquickwander/tst_qquickwander.cpp b/tests/auto/particles/qquickwander/tst_qquickwander.cpp index 6f056f5760..71a8ee1f97 100644 --- a/tests/auto/particles/qquickwander/tst_qquickwander.cpp +++ b/tests/auto/particles/qquickwander/tst_qquickwander.cpp @@ -35,7 +35,7 @@ void tst_qquickwander::test_basic() //the 500 was randomly changed from 0.0 in velocity bool vxChanged = false; bool vyChanged = false; - for (QQuickParticleData *d : qAsConst(system->groupData[0]->data)) { + for (QQuickParticleData *d : std::as_const(system->groupData[0]->data)) { if (d->t == -1) continue; //Particle data unused |