[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kimageshop
Subject: Possible bug in kis_convolution_painter.cc
From: Christoph Bartoschek <bartoschek () gmx ! de>
Date: 2006-03-23 4:38:05
Message-ID: 200603230538.05413.bartoschek () gmx ! de
[Download RAW message or body]
Hi,
In line 118 you have:
if (w < kw || h < kh || kw&1 == 0 || kh&1 == 0 || kernel->factor == 0 )
return;
The terms kw&1 == 0 and kh&1 == 0 are evaluated in this way: kw & (1 == 0)
and this is equivalent to kw & 0 and this is equivalent to 0.
The following programm shows the difference:
#include <iostream>
int main()
{
unsigned val = 0;
if (val & 1 == 0) {
std::cout << "I am in" << std::endl;
}
if ((val & 1) == 0) {
std::cout << "I am out" << std::endl;
}
}
Christoph Bartoschek
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic