[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:21:57
Message-ID: BAY112-W40688A709DC78442984D15B75E0 () phx ! gbl
[Download RAW message or body]

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.

> From: t.zachmann@zagge.de
> To: schumifer@hotmail.com
> Subject: Re: koffice/libs/kobase
> Date: Tue, 26 Jan 2010 06:38:18 +0100
> CC: kde-commits@kde.org
> 
> Hello,
> 
> On Tuesday 26 January 2010 00:46:50 Edward Apap wrote:
> > SVN commit 1080275 by eapap:
> > 
> > * Fixed logic and brought back the Pixel Unit
> > 
> > 
> > M  +2 -2      KoUnit.cpp
> 
> ....
> > Unit unit = static_cast<Unit>(i);
> > -        if (i != Pixel || hidePixel == false)
> > +        if ((i != Pixel) || ((i == Pixel) && (hidePixel == false)))
> 
> I don't think this change is needed. In case i is not equal Pixel it is true 
> due to the (i != Pixel) and the if is true and you never reach the || case 
> when you reach it is is definitely true and thus doesn't need to be checked 
> again.
> 
> Thorsten
 		 	   		  
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
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_2:092009



[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'>
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.<br><br>&gt; From: t.zachmann@zagge.de<br>&gt; To: \
schumifer@hotmail.com<br>&gt; Subject: Re: koffice/libs/kobase<br>&gt; Date: Tue, 26 \
Jan 2010 06:38:18 +0100<br>&gt; CC: kde-commits@kde.org<br>&gt; <br>&gt; \
Hello,<br>&gt; <br>&gt; On Tuesday 26 January 2010 00:46:50 Edward Apap \
wrote:<br>&gt; &gt; SVN commit 1080275 by eapap:<br>&gt; &gt; <br>&gt; &gt; * Fixed \
logic and brought back the Pixel Unit<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt;  M  +2 \
-2      KoUnit.cpp<br>&gt; <br>&gt; ....<br>&gt; &gt;          Unit unit = \
static_cast&lt;Unit&gt;(i);<br>&gt; &gt; -        if (i != Pixel || hidePixel == \
false)<br>&gt; &gt; +        if ((i != Pixel) || ((i == Pixel) &amp;&amp; (hidePixel \
== false)))<br>&gt; <br>&gt; I don't think this change is needed. In case i is not \
equal Pixel it is true <br>&gt; due to the (i != Pixel) and the if is true and you \
never reach the || case <br>&gt; when you reach it is is definitely true and thus \
doesn't need to be checked <br>&gt; again.<br>&gt; <br>&gt; Thorsten<br> 		 	   		  \
<br /><hr />Windows Live: Make it easier for your friends to see  <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_2:092009' \
target='_new'>what you’re up to on Facebook.</a></body> </html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic