[Digikam-devel] Re: warnings from MSVC2008

Richard Mortimer richm at oldelvet.org.uk
Tue Apr 5 12:39:54 BST 2011



On 05/04/2011 11:44, Gilles Caulier wrote:
> I fixed this warning by this commit :
>
> http://commits.kde.org/digikam/91a8ec5e16728ceb30883e56cfc5ba0c1c7ba3d7
>
> Let's me hear if all is fine for you ?
>
Hi,

Apologies if I've not understood the code (I only lurk here!) but that 
isn't how I expected it to be fixed. I was expecting something more like

if (!(d->flags & GeometryEditable))

or even

if ((d->flags & GeometryEditable) == 0)

The change you made just seems to ignore any other potential flag bits 
that could be in that location.

Regards

Richard

P.S. Thanks for all your hard work in making Digikam. It really does 
rock and 2.0.0 looks really exciting.

> Gilles
>
> 2011/4/4 Marcel Wiesweg<marcel.wiesweg at gmx.de>:
>>
>>> Line is there :
>>>
>>> https://projects.kde.org/projects/extragear/graphics/digikam/repository/rev
>>> isions/master/entry/libs/widgets/graphicsview/regionframeitem.cpp#L621
>>>
>>> The problem is NOT operator on front of d->flags, which convert it to
>>> pure boolean and applying AND operator with GeometryEditable is a
>>> problem.
>>>
>>> http://msdn.microsoft.com/en-us/library/fx3e68bw%28v=vs.80%29.aspx
>>>
>>> What do you think about ?
>>
>> Yes, it's a mistake in the code. We want to ignore the event if the flag is
>> not set. The compiler is right with it's warning...



More information about the Digikam-devel mailing list