nanogui: [patch] fix for zero width/height rectangles


Previous by date: 16 Jul 2005 02:37:43 +0100 Re: [patch] fix for zero width/height rectangles, Paul Bartholomew
Next by date: 16 Jul 2005 02:37:43 +0100 Re: [patch] fix for zero width/height rectangles, Alex Holden
Previous in thread: 16 Jul 2005 02:37:43 +0100 Re: [patch] fix for zero width/height rectangles, Paul Bartholomew
Next in thread: 16 Jul 2005 02:37:43 +0100 Re: [patch] fix for zero width/height rectangles, Alex Holden

Subject: Re: [nanogui] Re: [patch] fix for zero width/height rectangles
From: "Sun Yingfeng" ####@####.####
Date: 16 Jul 2005 02:37:43 +0100
Message-Id: <000901c589a7$2aebfe20$0a01a8c0@sun>

I think the first case:
    if (!w || !h)
        return;
case reduce execution time than: 
    if ((w == 0) || (h == 0))
        return;
Because judge "not equal" is need less time than judge "equal" in most CPU.



----- Original Message ----- 
From: "Paul Bartholomew" ####@####.####
To: ####@####.#### ####@####.####
Sent: Saturday, July 16, 2005 3:34 AM
Subject: RE: [nanogui] Re: [patch] fix for zero width/height rectangles


> >
> >+       if (!w || !h)
> >+               return;
> >
> >wouldn't this be more readable if it was (w == 0 || h == 0)?
> 
> This certainly seems like a personal preference to me.  I don't know if 
> there are any 'coding standards' in the Microwindows/Nano-X project that 
> would define the 'correct' way to represent this...
> 
> I'd (personally) use either the "(!w || !h)" version, or:
> 
> 
>     ((w == 0) || (h == 0))
> 
> (extra parens)
> 
> Of course, that's just my personal preference.
> 
> - Paul
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 

Previous by date: 16 Jul 2005 02:37:43 +0100 Re: [patch] fix for zero width/height rectangles, Paul Bartholomew
Next by date: 16 Jul 2005 02:37:43 +0100 Re: [patch] fix for zero width/height rectangles, Alex Holden
Previous in thread: 16 Jul 2005 02:37:43 +0100 Re: [patch] fix for zero width/height rectangles, Paul Bartholomew
Next in thread: 16 Jul 2005 02:37:43 +0100 Re: [patch] fix for zero width/height rectangles, Alex Holden


Powered by ezmlm-browse 0.20.