[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>&gt; From: zander@kde.org<br>&gt; To: \
kde-commits@kde.org<br>&gt; Subject: Re: koffice/libs/kobase<br>&gt; Date: Tue, 26 \
Jan 2010 13:47:26 +0100<br>&gt; CC: schumifer@hotmail.com<br>&gt; <br>&gt; On Tuesday \
26. January 2010 13.21.57 Ed . wrote:<br>&gt; &gt; I want it to always return true \
when the unit is not Pixel. But I also<br>&gt; &gt; want it to return true when the \
unit is Pixel and hidePixel is set to<br>&gt; &gt; false.<br>&gt; <br>&gt; []<br>&gt; \
&gt; &gt; &gt;          Unit unit = static_cast&lt;Unit&gt;(i);<br>&gt; &gt; &gt; \
&gt; -        if (i != Pixel || hidePixel == false)<br>&gt; &gt; &gt; &gt; +        \
if ((i != Pixel) || ((i == Pixel) &amp;&amp; (hidePixel == false)))<br>&gt; <br>&gt; \
These two lines have identical logic due to the 'or' in between (instead of <br>&gt; \
that being an 'and') so Thorsten has a point.<br>&gt; I think reverting this makes \
sense as the shorter version is equally correct <br>&gt; but faster. (though I bet \
that good compilers optimize it to be the same)<br>&gt; <br>&gt; -- <br>&gt; 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