[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KPresenter
From: Sirtaj Singh Kang <ssk () physics ! unimelb ! edu ! au>
Date: 1999-11-02 6:54:55
[Download RAW message or body]
On Tue, 2 Nov 1999, Don Sanders wrote:
[snip]
> I'm using static_cast as the programmers FAQ said don't use dynamic_cast
> unless you have to, and I didn't want to use C style casts, as I was under the
> impression that would mean I would burn in hell for all eternity.
I was under the impression that static_cast and the old C-style cast were
the same? If this is the case, you may already be burning in hell and
don't even know it. :)
When the Programmer's FAQ says "avoid dynamic_cast" (I haven't seen this
FAQ), I would hazard it means "think about why you need the cast at all".
When casting down the inheritance tree (eg casting a QWidget * to
QPopupMenu *), dynamic_cast is the best way to do it. For anything else,
use C-style or static_cast. (except when you are just removing const; then
use const_cast).
-Taj.
Sirtaj S. Kang taj@kde.org ssk@physics.unimelb.edu.au
Univ of Melbourne The "gui" in "Penguin" is pronounced "K-D-E"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic