[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>> From: t.zachmann@zagge.de<br>> To: \
schumifer@hotmail.com<br>> Subject: Re: koffice/libs/kobase<br>> Date: Tue, 26 \
Jan 2010 06:38:18 +0100<br>> CC: kde-commits@kde.org<br>> <br>> \
Hello,<br>> <br>> On Tuesday 26 January 2010 00:46:50 Edward Apap \
wrote:<br>> > SVN commit 1080275 by eapap:<br>> > <br>> > * Fixed \
logic and brought back the Pixel Unit<br>> > <br>> > <br>> > M +2 \
-2 KoUnit.cpp<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>> I don't think this change is needed. In case i is not \
equal Pixel it is true <br>> due to the (i != Pixel) and the if is true and you \
never reach the || case <br>> when you reach it is is definitely true and thus \
doesn't need to be checked <br>> again.<br>> <br>> 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