diff options
| author | Jonah BrĂ¼chert <jbb.prv@gmx.de> | 2019-10-19 17:23:08 +0200 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2019-10-22 15:32:25 +0200 |
| commit | 876c924cde7b8fe129d0f3e1b76cf0a2de9fb856 (patch) | |
| tree | c0a8816bf3fbff9fe1c6efd229dad5897cbdf61b /src/base/QXmppUtils.cpp | |
| parent | 70dfa23900a3905285435a10fdaa97462a67016f (diff) | |
| download | qxmpp-876c924cde7b8fe129d0f3e1b76cf0a2de9fb856.tar.gz | |
Use raw literals, range based loops and auto
Diffstat (limited to 'src/base/QXmppUtils.cpp')
| -rw-r--r-- | src/base/QXmppUtils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base/QXmppUtils.cpp b/src/base/QXmppUtils.cpp index 6b443c86..a46694b0 100644 --- a/src/base/QXmppUtils.cpp +++ b/src/base/QXmppUtils.cpp @@ -228,8 +228,8 @@ QString QXmppUtils::jidToBareJid(const QString& jid) quint32 QXmppUtils::generateCrc32(const QByteArray &in) { quint32 result = 0xffffffff; - for(int n = 0; n < in.size(); ++n) - result = (result >> 8) ^ (crctable[(result & 0xff) ^ (quint8)in[n]]); + for(char n : in) + result = (result >> 8) ^ (crctable[(result & 0xff) ^ (quint8)n]); return result ^= 0xffffffff; } |
