[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KPresenter
From: Waldo Bastian <bastian () suse ! de>
Date: 1999-11-02 7:57:32
[Download RAW message or body]
On Mon, 01 Nov 1999, Reginald Stadlbauer wrote:
> On Mon, 01 Nov 1999, Kurt Granroth wrote:
> >Reginald Stadlbauer wrote:
> >> 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.
> >
> >Why is it better? I'll admit that I've never used dynamic_cast before
> >as I couldn't see the point.
>
> dynamic_casts do typechecking. So, if it fails, it returns a NULL-pointer.
> AFAIK a C cast would just segfault. But as I donīt check the result of each
> dynamic_cast the result is the same :-)
>
> And to be honest: Iīm not using dynamic_casts anymore, but I just donīt want
> to go over all the KPresenter and KWord sources and revert the casts :-)
I don't see the point in abandoning dynamic_casts because it saves 5Kb
of memory. Are we going to drop all parts of the C++ standard which
require memory?
Cheers,
Waldo
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic