diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-10-06 11:40:35 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-10-06 18:20:31 +0200 |
commit | 35ab16d5e881f8f4507d2f3e0a8a04214fff7bdc (patch) | |
tree | 8983c14648c4768fef39f8e815c6648d970886b3 /src/plugins/canbus/tinycan | |
parent | a2f9cae04e4fadbc2147a7678dee1b5b09e5a5ec (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.
Task-number: QTBUG-99313
Change-Id: I805f044a494f0ed3066c9c132767d541108c0e2d
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/plugins/canbus/tinycan')
-rw-r--r-- | src/plugins/canbus/tinycan/tinycanbackend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/canbus/tinycan/tinycanbackend.cpp b/src/plugins/canbus/tinycan/tinycanbackend.cpp index 06564ea..9feb4b7 100644 --- a/src/plugins/canbus/tinycan/tinycanbackend.cpp +++ b/src/plugins/canbus/tinycan/tinycanbackend.cpp @@ -89,7 +89,7 @@ static void DRV_CALLBACK_TYPE canRxEventCallback(quint32 index, TCanMsg *frame, Q_UNUSED(count); QMutexLocker lock(&gTinyCan->mutex); - for (TinyCanBackendPrivate *p : qAsConst(gTinyCan->channels)) { + for (TinyCanBackendPrivate *p : std::as_const(gTinyCan->channels)) { if (p->channelIndex == int(index)) { p->startRead(); return; |