*/
static void build_scale_table(uint **table, uint nBits)
{
- if (nBits > 7) {
+ if (Q_UNLIKELY(nBits > 7)) {
qWarning("build_scale_table: internal error, nBits = %i", nBits);
return;
}
hd = 0;
picture = 0;
d = 0;
- if (!make_null)
+ if (Q_UNLIKELY(!make_null))
qWarning("QPixmap: Invalid pixmap parameters");
return;
}
}
free(newbits);
newbits = (uchar *)newerbits;
- } else if (xi->bits_per_pixel != 8) {
- qWarning("QPixmap::fromImage: Display not supported "
- "(bpp=%d)", xi->bits_per_pixel);
+ } else if (Q_UNLIKELY(xi->bits_per_pixel != 8)) {
+ qWarning("QPixmap::fromImage: Display not supported (bpp=%d)", xi->bits_per_pixel);
}
xi->data = (char *)newbits;
}
void QPixmap::x11SetScreen(int screen)
{
- if (paintingActive()) {
+ if (Q_UNLIKELY(paintingActive())) {
qWarning("QPixmap::x11SetScreen(): Cannot change screens during painting");
return;
}