aboutsummaryrefslogtreecommitdiffstats
path: root/src/coap/qcoapprotocol.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-06 11:15:00 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-06 17:43:41 +0200
commita01b9dfc244aca91da35789333b088dc53b54994 (patch)
treeb0e29fa5bc162291f40c8ed60d39eba759b4b821 /src/coap/qcoapprotocol.cpp
parentbe8150867f74f76fdcd85a516b5fb9a7abb1524a (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: I0483bd72018332f9a1d7c60537228ea6c85f7029 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/coap/qcoapprotocol.cpp')
-rw-r--r--src/coap/qcoapprotocol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coap/qcoapprotocol.cpp b/src/coap/qcoapprotocol.cpp
index 3c2eb4e..eb499ed 100644
--- a/src/coap/qcoapprotocol.cpp
+++ b/src/coap/qcoapprotocol.cpp
@@ -523,7 +523,7 @@ void QCoapProtocolPrivate::onLastMessageReceived(QCoapInternalRequest *request,
QByteArray finalPayload;
int lastBlockNumber = -1;
- for (auto reply : qAsConst(replies)) {
+ for (auto reply : std::as_const(replies)) {
int currentBlock = static_cast<int>(reply->currentBlockNumber());
QByteArray replyPayload = reply->message()->payload();
if (replyPayload.isEmpty() || currentBlock <= lastBlockNumber)