reduce branches in QIcuCodec::codecForUtf

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-12-03 04:13:54 +00:00
parent eb3055e0fb
commit cd1bb895f3

View file

@ -1088,9 +1088,7 @@ QTextCodec *QIcuCodec::codecForUtf(const QByteArray &text, QTextCodec *defaultCo
if (Q_UNLIKELY(U_FAILURE(error))) {
qWarning("QIcuCodec::codecForText: ucnv_detectUnicodeSignature() failed %s", u_errorName(error));
return defaultCodec;
}
if (name) {
} else if (name) {
return QTextCodec::codecForName(name);
}