From 8cf1dc8a0eb6b399fc6676b0a2a82aef3af1b22c Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Sun, 13 Mar 2022 01:15:33 +0100 Subject: Split with char instead of string when possible Saves constructing the QString and makes the splitting faster. --- src/base/QXmppJingleIq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/base/QXmppJingleIq.cpp') diff --git a/src/base/QXmppJingleIq.cpp b/src/base/QXmppJingleIq.cpp index 1adf3daa..072e1e97 100644 --- a/src/base/QXmppJingleIq.cpp +++ b/src/base/QXmppJingleIq.cpp @@ -461,7 +461,7 @@ void QXmppJingleIq::Content::toXml(QXmlStreamWriter *writer) const bool QXmppJingleIq::Content::parseSdp(const QString &sdp) { QList payloads; - for (auto &line : sdp.split('\n')) { + for (auto &line : sdp.split(QChar(u'\n'))) { if (line.endsWith('\r')) line.resize(line.size() - 1); if (line.startsWith(QStringLiteral("a="))) { -- cgit v1.2.3