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

List:       kde-commits
Subject:    Re: KDE/kdebase/workspace/plasma/containments/desktop
From:       Sebastian =?iso-8859-15?q?K=FCgler?= <sebas () kde ! org>
Date:       2009-02-16 21:30:03
Message-ID: 200902162230.04496.sebas () kde ! org
[Download RAW message or body]

> On February 12, 2009 11:10:25 Ambroz Bizjak wrote:
>  > SVN commit 925216 by abizjak:
>  > +            if ((align & Qt::AlignTop)) {
>  > +                newY = a.bottom();
>  > +                if (!(newY > y)) return possiblePositions;

> On Sun, Feb 15, 2009 at 1:55 AM, Chani <chanika@gmail.com> wrote:
>  nitpick: always use {} with if statements, please.
>  also, ! and > is less clear than just <=

On Monday 16 February 2009 18:44:13 Ambroz Bizjak wrote:
> Otherwise, I find "if (!(<expression>)) { <fail> }" easier to read, it's
> like an assertion.

That might be true, but I'd say consistency in the code is paramount here. If 
we all just write things the way we find it more readable, it quickly won't be 
anymore. That matters, especially in files that are supposed to be read by 
many people.

It should be:

if (newY <= y) {
	return possiblePositions;
}

-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 

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

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