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

List:       kde-core-devel
Subject:    Re: KPresenter
From:       Reginald Stadlbauer <reggie () troll ! no>
Date:       1999-11-02 10:22:09
[Download RAW message or body]

On Tue, 02 Nov 1999, Stephan Kulow wrote:
>Reginald Stadlbauer wrote:
>> 
>> On Mon, 01 Nov 1999, Dirk A. Mueller wrote:
>> >Reginald Stadlbauer <reggie@troll.no> wrote:
>> >
>> >> KPresenter uses dynamic_casts. SO does it mean I have to switch all
>> >> back to C-casts now (would be lots of work :-(( )
>> >
>> >errm, if const_casts would work, why don't use them? they're faster! :)
>> 
>> Who says const_casts would work.
>> 
>> I mean, you can always live without C++ casts, because
>> 
>> dynamic_cast<AClass>( aPtr )->doSomething()
>> 
>> can be replaced by
>> 
>> ( (AClass*)aPtr )->soSomething().
>> 
>> Itīs just that the first (C++) solution is the better one.
>> 
>Hmm, but dynamic_cast will return 0 while (AClass*) will just
>do _something_. :)

I already pointed out that the way I use it (without checking the result) it
doesnīt make much sense :-) Anyway, where I used it I know that the type is ok,
so the problem is not that big.

-- 
Reggie

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

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