[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: RE: koffice/libs/kobase
From: "Ed ." <schumifer () hotmail ! com>
Date: 2010-01-26 12:51:31
Message-ID: BAY112-W1940CFDCD08298A98B0674B75E0 () phx ! gbl
[Download RAW message or body]
You're right, I will revert that line
> From: zander@kde.org
> To: kde-commits@kde.org
> Subject: Re: koffice/libs/kobase
> Date: Tue, 26 Jan 2010 13:47:26 +0100
> CC: schumifer@hotmail.com
>
> On Tuesday 26. January 2010 13.21.57 Ed . wrote:
> > I want it to always return true when the unit is not Pixel. But I also
> > want it to return true when the unit is Pixel and hidePixel is set to
> > false.
>
> []
> > > > Unit unit = static_cast<Unit>(i);
> > > > - if (i != Pixel || hidePixel == false)
> > > > + if ((i != Pixel) || ((i == Pixel) && (hidePixel == false)))
>
> These two lines have identical logic due to the 'or' in between (instead of
> that being an 'and') so Thorsten has a point.
> I think reverting this makes sense as the shorter version is equally correct
> but faster. (though I bet that good compilers optimize it to be the same)
>
> --
> Thomas Zander
_________________________________________________________________
Keep your friends updated—even when you’re not signed in.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092010
[Attachment #3 (text/html)]
<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
You're right, I will revert that line<br><br>> From: zander@kde.org<br>> To: \
kde-commits@kde.org<br>> Subject: Re: koffice/libs/kobase<br>> Date: Tue, 26 \
Jan 2010 13:47:26 +0100<br>> CC: schumifer@hotmail.com<br>> <br>> On Tuesday \
26. January 2010 13.21.57 Ed . wrote:<br>> > I want it to always return true \
when the unit is not Pixel. But I also<br>> > want it to return true when the \
unit is Pixel and hidePixel is set to<br>> > false.<br>> <br>> []<br>> \
> > > Unit unit = static_cast<Unit>(i);<br>> > > \
> - if (i != Pixel || hidePixel == false)<br>> > > > + \
if ((i != Pixel) || ((i == Pixel) && (hidePixel == false)))<br>> <br>> \
These two lines have identical logic due to the 'or' in between (instead of <br>> \
that being an 'and') so Thorsten has a point.<br>> I think reverting this makes \
sense as the shorter version is equally correct <br>> but faster. (though I bet \
that good compilers optimize it to be the same)<br>> <br>> -- <br>> Thomas \
Zander<br> <br /><hr />Keep your friends updated— <a \
href='http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092010' \
target='_new'>even when you’re not signed in.</a></body> </html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic