[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: PATCH: flicker in startup identification
From: Lubos Lunak <l.lunak () sh ! cvut ! cz>
Date: 2001-05-18 18:00:10
[Download RAW message or body]
Dne pá 18. květen 2001 19:43 Dirk Mueller napsal(a):
> On Fre, 18 Mai 2001, Rik Hemsley wrote:
> > <even_more_pedantic>
> > - if( !startup_widget ) {
> > + if (0 == startup_widget) {
> > </even_more_pedantic>
<insanely pedantic>
- if(0 == startup_widget ) {
+ if( static_cast< QWidget* >( 0 ) == startup_widget ) {
</insanely pedantic>
> >
> > Just kidding, but I don't like to see boolean operators
> > used to test pointer values. Call me pedantic ;)
>
> Discussing this is more of philosophical nature, but IMHO using a boolean
> operature is just right. you can't assume anything about a pointer value,
> so I think using a boolean operator in the sense of "is this valid?" is
> better.
Integral 0 is always converted to null pointer, regardless of how the null
pointer is represented. Even if null pointer is actually binary represented
as integral 0x12348765 , as long as NULL is #define NULL 0 ( or const int
NULL = 0; ... who cares ), everything is fine.
The important thing is that it works, and I think we should continue in this
discussion only when something really breaks ( and I think I can with very
good accurancy say the exact date when this will happen : 'never' ).
>
> anyway..
>
>
> Dirk
Lenin oops I mean NULL was, is and will be ... :)
Lubos Lunak
--
l.lunak@email.cz ; l.lunak@kde.org
http://dforce.sh.cvut.cz/~seli
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic