mark warning case in QBmpHandler::canRead() as unlikely

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-08-04 16:37:42 +03:00
parent eff7ceafde
commit 15af803644

View file

@ -689,8 +689,8 @@ bool QBmpHandler::canRead() const
bool QBmpHandler::canRead(QIODevice *device)
{
if (!device) {
qWarning("QBmpHandler::canRead() called with 0 pointer");
if (Q_UNLIKELY(!device)) {
qWarning("QBmpHandler::canRead() called with no device");
return false;
}