summaryrefslogtreecommitdiffstats
path: root/src/network/access/http2/http2protocol.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-06-08 11:17:11 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-08-04 09:28:41 +0000
commit4a40c717f3cf1ae181df49c91261a12d5e33e5a4 (patch)
tree1499ae2207288254e74d277629c3e9fb051a4dcc /src/network/access/http2/http2protocol.cpp
parent31520c4fc0a7a7981e91145b6cff24d08a2ea81b (diff)
Optimize QString::compare_helper(QChar*, int, char*, int, cs)
... by using the recently-added QUtf8::convertToUnicode() and a QVarLengthArray instead of QString::fromUtf8(). Like elsewhere in QString, use a QVarLengthArray<ushort> instead of the more natural <QChar> to avoid instantiating another QVLA. Assume that length2 is usually set to a non-negative value. Not because that's necessarily the frequent case, but because a negative length2 leads to an expensive strlen, that usually dwarfs the additional branch cost. Check for data2 == nullptr early to avoid having to check it later twice. Change-Id: I04bda44ed857451efdf04c3283b5726480dd8c0d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/access/http2/http2protocol.cpp')
0 files changed, 0 insertions, 0 deletions