Improve readability of code

This commit is contained in:
Adolfo E. García 2017-10-20 23:50:34 -06:00 committed by Janek Bevendorff
parent f1d99dd0ed
commit 86cd2c09a4

View File

@ -125,13 +125,9 @@ QVariant Base32::decode(const QByteArray& encodedData)
const int offset = (nQuantumBytes - 1) * 8;
quint64 mask = quint64(0xFF) << offset;
for (int n = offset; n >= 0; n -= 8) {
if (o < nBytes) {
for (int n = offset; n >= 0 && o < nBytes; n -= 8) {
data[o++] = static_cast<char>((quantum & mask) >> n);
mask >>= 8;
} else {
break;
}
}
}