Issue 96099 - svx: dodgy double assignment
Summary: svx: dodgy double assignment
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: code (show other issues)
Version: DEV300m35
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 3.2
Assignee: ooo
QA Contact: issues@graphics
URL:
Keywords:
: 104620 (view as issue list)
Depends on:
Blocks: 96084
  Show dependency tree
 
Reported: 2008-11-11 14:50 UTC by caolanm
Modified: 2010-01-23 12:47 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
probable intention (747 bytes, patch)
2008-11-11 14:50 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2008-11-11 14:50:12 UTC
const bool bCompletelyTransparent(0xff == nStartLuminance == nEndLuminance);
will bind as
const bool bCompletelyTransparent((0xff == nStartLuminance) == nEndLuminance);
giving either
const bool bCompletelyTransparent(true == nEndLuminance);
or
const bool bCompletelyTransparent(false == nEndLuminance);

The attachment does what we probably want, i.e. return true if both nStart and
nEnd are the same value of 0xff
Comment 1 caolanm 2008-11-11 14:50:58 UTC
Created attachment 57877 [details]
probable intention
Comment 2 ooo 2008-11-17 10:41:57 UTC
verifying patch
Comment 3 ooo 2009-03-18 12:34:25 UTC
retargeted to 3.2
Comment 4 ooo 2009-05-15 18:23:40 UTC
fixed
Comment 5 caolanm 2009-08-31 09:23:16 UTC
*** Issue 104620 has been marked as a duplicate of this issue. ***
Comment 6 Armin Le Grand 2009-09-03 11:15:21 UTC
AW->KA: Thanks for taking care of this (saw it looking at #i104620#). Intended is:

bCompletelyTransparent((0xff == nStartLuminance) && (0xff == nEndLuminance))

Just to make sure You replaced correctly...
Comment 7 ooo 2009-09-14 11:15:34 UTC
verified
Comment 8 caolanm 2010-01-23 12:47:37 UTC
closing