mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
QImage::colorTable() method optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
fb246bc58e
commit
16fc3caacf
1 changed files with 3 additions and 1 deletions
|
@ -1190,8 +1190,10 @@ void QImage::setColorTable(const QVector<QRgb> &colors)
|
|||
QVector<QRgb> QImage::colorTable() const
|
||||
{
|
||||
QVector<QRgb> result;
|
||||
if (!d || d->depth != 1)
|
||||
if (!d || d->depth != 1) {
|
||||
return result;
|
||||
}
|
||||
result.reserve(2);
|
||||
result.append(d->mono0);
|
||||
result.append(d->mono1);
|
||||
return result;
|
||||
|
|
Loading…
Add table
Reference in a new issue