mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
use memcmp() to compare QImage objects without color tables
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
08e5d5b8f9
commit
9be2a56ea8
1 changed files with 5 additions and 0 deletions
|
@ -3806,6 +3806,11 @@ bool QImage::operator==(const QImage & i) const
|
|||
return false;
|
||||
}
|
||||
|
||||
if (i.d->format == d->format && i.d->nbytes == d->nbytes
|
||||
&& d->format >= QImage::Format_RGB32 && d->format <= QImage::Format_RGB16) {
|
||||
return (memcmp(constBits(), i.constBits(), d->nbytes) == 0);
|
||||
}
|
||||
|
||||
for (int h = 0; h < d->height; h++) {
|
||||
for (int w = 0; w < d->width; w++) {
|
||||
if (pixel(w, h) != i.pixel(w, h)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue