QHttp2ProtocolHandler - avoid calls to detach in a range-loop

Found by clazy-range-loop check.

Change-Id: I45fd03af60c8d15e1288cc8abd81d8532b9a6c45
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Timur Pocheptsov 2017-10-23 14:51:40 +02:00
parent 895cb4681e
commit cba24d65c4
1 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,8 @@ HPack::HttpHeader build_headers(const QHttpNetworkRequest &request, quint32 maxH
if (size.second > maxHeaderListSize)
return HttpHeader(); // Bad, we cannot send this request ...
for (const auto &field : request.header()) {
const auto requestHeader = request.header();
for (const auto &field : requestHeader) {
const HeaderSize delta = entry_size(field.first, field.second);
if (!delta.first) // Overflow???
break;